Link to home
Start Free TrialLog in
Avatar of Member_2_4898346
Member_2_4898346Flag for New Zealand

asked on

lstm cntk sequence to sequence in c#

When my data looks like this:

      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

And my variables are declared like this:

      var features = Variable.InputVariable(new int[] { 10 }, DataType.Float, featuresName, null, true);
      var labels = Variable.InputVariable(new int[] { 10 }, DataType.Float, labelsName, new List<Axis>() { Axis.DefaultBatchAxis() }, true);

Then the code works, but when I want my network to produce sequence --> sequence so my data looks like this:

      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

I get this error:

      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], [#])').

How do I tell CNTK that this is ok?
ASKER CERTIFIED SOLUTION
Avatar of Member_2_4898346
Member_2_4898346
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_4898346

ASKER

Thanks to KeDengMS for explaining this to me :-)