title: Error: Value rank (4) should be larger than the Variable rank (1) at most by number of dynamic axes (2)
body: <p>I would like to know How to provide input varibales to CNTK Network Modelling and training the model like given <a href="https://github.com/Microsoft/CNTK/blob/master/Tutorials/CNTK_106A_LSTM_Timeseries_with_Simulated_Data.ipynb" rel="nofollow noreferrer">here</a></p>
  
  <p>Since i  have two independent variable and 3 target variables, X and Y are of shape:  </p>
  
  <pre><code>X["train"].shape
  Out[60]: (34567, 10, 2, 1)
  
  Y["train"].shape
  Out[61]: (34567, 3, 1)
  </code></pre>
  
  <p>i gave time_steps and time_shift as 10. </p>
  
  <pre><code>N = 10  ### Specify the internal-state dimensions of the LSTM cell which is 10
  def create_model(x):
      with C.layers.default_options(initial_state = 0.1):
          m = C.layers.Recurrence(C.layers.LSTM(N))(x)
          m = C.sequence.last(m)
          m = C.layers.Dropout(0.2, seed=1)(m)
          m = C.layers.Dense(1)(m)
          return m
  
  
  BATCH_SIZE = 100;EPOCHS = 100
  
  def next_batch(x, y, ds):
      def as_batch(data, start, count):
          part = []
          for i in range(start, start + count):
              part.append(data[i])
          return np.array(part)
      for i in range(0, len(x[ds])-BATCH_SIZE, BATCH_SIZE):
          yield as_batch(x[ds], i, BATCH_SIZE), as_batch(y[ds], i, BATCH_SIZE)
  
  
  
  x = C.sequence.input_variable(1)
  z = create_model(x)
  l = C.input_variable(1, dynamic_axes=z.dynamic_axes, name="y")
  learning_rate = 0.02
  lr_schedule = C.learning_parameter_schedule(learning_rate)
  loss = C.squared_error(z, l)
  error = C.squared_error(z, l)
  momentum_schedule = C.momentum_schedule(0.9, minibatch_size=BATCH_SIZE)
  learner = C.fsadagrad(z.parameters, 
                        lr = lr_schedule, 
                        momentum = momentum_schedule, 
                        unit_gain = True)
  trainer = C.Trainer(z, (loss, error), [learner])
  
  
  
  # train
  loss_summary = []
  for epoch in range(0, EPOCHS):
      for x1, y1 in next_batch(X, Y, "train"):
          trainer.train_minibatch({x: x1, l: y1})
      if epoch % (EPOCHS / 10) == 0:
          training_loss = trainer.previous_minibatch_loss_average
          loss_summary.append(training_loss)
          print("epoch: {}, loss: {:.5f}".format(epoch, training_loss))
  </code></pre>
  
  <p>But this produces error : </p>
  
  <blockquote>
    <p>Traceback (most recent call last):</p>
    
    <p>File "", line 6, in 
        trainer.train_minibatch({x: x1, l: y1})</p>
    
    <p>File "c:\program
    files\python36\lib\site-packages\cntk\train\trainer.py", line 184, in
    train_minibatch
        device)</p>
    
    <p>File "c:\program files\python36\lib\site-packages\cntk\cntk_py.py",
    line 2856, in train_minibatch
        return _cntk_py.Trainer_train_minibatch(self, *args)</p>
    
    <p>ValueError: Value rank (4) should be larger than the Variable rank (1)
    at most by number of dynamic axes (2); Variable = 'Input('Input4973',
    [#, *], <a href="https://github.com/Microsoft/CNTK/blob/master/Tutorials/CNTK_106A_LSTM_Timeseries_with_Simulated_Data.ipynb" rel="nofollow noreferrer">1</a>)', Value shape = '[100 x 10 x 2 x 1]'.</p>
    
    <p>[CALL STACK]</p>
    
    <blockquote>
      <p>CNTK::TrainingParameterSchedule::  Transform
          - CNTK::Internal::  UseSparseGradientAggregationInDataParallelSGD (x2)
          - CNTK::Function::  Forward
          - CNTK::  CreateTrainer
          - CNTK::Trainer::  TotalNumberOfUnitsSeen
          - CNTK::Trainer::  TrainMinibatch (x2)
          - PyInit__cntk_py (x2)
          - PyEval_EvalFrameDefault
          - Py_CheckFunctionResult
          - PyObject_CallFunctionObjArgs
          - PyEval_EvalFrameDefault
          - Py_CheckFunctionResult
          - PyObject_CallFunctionObjArgs</p>
    </blockquote>
  </blockquote>
  
  <p>I know this error corresponds to dynamic axes and input variables. But i don't know what to give as input variable in C.sequence.input_variable(1)  and  C.input_variable(1, dynamic_axes=z.dynamic_axes, name="y")</p>
  
  <p>Also, i want to predict three target variables </p>