【发布时间】:2018-01-22 01:55:54
【问题描述】:
当我的数据看起来像这样时:
1 |x 3:1 |y 8:1
1 |x 4:1 |y
1 |x 5:1 |y
1 |x 6:1 |y
1 |x 7:1 |y
我的变量是这样声明的:
var features = Variable.InputVariable(new int[] { inputDim }, DataType.Float, featuresName, null, true);
var labels = Variable.InputVariable(new int[] { numOutputClasses }, DataType.Float, labelsName, new List<Axis>() { Axis.DefaultBatchAxis() }, true);
然后代码可以工作,但是当我希望我的网络产生序列时 --> 序列,所以我的数据看起来像这样:
1 |x 3:1 |y 4:1
1 |x 4:1 |y 5:1
1 |x 5:1 |y 6:1
1 |x 6:1 |y 7:1
1 |x 7:1 |y 8:1
我得到这个错误:
Unhandled Exception: System.ArgumentOutOfRangeException:
The dimension size (5) of the axis (1) of the Value ('[10 x 5 x 20]')
must be 1, because this axis is not specified as a dynamic axis of
the Variable ('Input('labels', [10], [#])').
我如何告诉 CNTK 这没关系,我想在序列的每一步输出,所以我认为它应该有这些数据,这是一个经典的多对多 LSTM。但要么 CNTK c# api 坏了,要么我只是不知道如何告诉它我想要做什么(很可能)。
10 个输入,10 个输出,第一个序列中有 5 个元素,我的批次中有 20 个序列。
【问题讨论】: