CNTK 发送有关 'sequence.gather' 运算符的错误

CNTK sends an error regarding 'sequence.gather' operator

我正在尝试使用 'sequence.gather' 运算符创建模型,但在调用 'train_minibatch'.

时出现错误 "Where operation can only operate on scalar input"
input_seq_axis = Axis('inputAxis')
input_sequence = sequence.input_variable(shape=vocab_dim, sequence_axis=input_seq_axis)
vowel_mask_sequence = sequence.input_variable(shape=2, sequence_axis=input_seq_axis)
a = Sequential([
    C.layers.Recurrence(C.layers.LSTM(hidden_dim)),
    ])
b=C.sequence.gather(a(input_sequence),vowel_mask_sequence)
z=Dense(3)(b)
label_sequence = sequence.input_variable(3, sequence_axis=z.dynamic_axes[1])

如何修复错误?我什至不使用 'where' 运算符。

对于sequence.gather(x, y),y必须是一个标量,也就是说:

assert y.shape == (1,)

y 的值必须为 0 或 1,并且还具有与 x 完全相同的动态轴。

有关如何使用我维护的库中的 sequence.gatherexample