title: tfjs Error: Argument tensors passed to stack must be a `Tensor[]` or `TensorLike[]`
body: <p>I'm trying to build a simple deep lstm neural network. I'm not much experienced with machine learning in general. But I do know some basics. This is my sample model.</p>
  <pre class="lang-js prettyprint-override"><code>const model    = tf.sequential();
  const {layers} = tf;
  
  model.add(layers.lstm({
      units           : 256,
      inputShape      : [1, 6],
      activation      : &quot;relu&quot;,
      returnSequences : true,
  }));
  model.add(layers.dropout({rate: 0.2}));
  model.add(layers.batchNormalization());
  
  model.add(layers.lstm({
      units           : 128,
      activation      : &quot;relu&quot;,
      returnSequences : true,
  }));
  model.add(layers.dropout({rate: 0.2}));
  model.add(layers.batchNormalization());
  
  model.add(layers.lstm({
      units      : 128,
      activation : &quot;relu&quot;,
  }));
  model.add(layers.dropout({rate: 0.2}));
  model.add(layers.batchNormalization());
  
  model.add(layers.dense({
      units      : 32,
      activation : &quot;relu&quot;,
  }));
  model.add(layers.dropout({rate: 0.2}));
  
  model.add(layers.dense({
      units      : 2,
      activation : &quot;softmax&quot;,
  }));
  model.compile({
      //loss      : &quot;sparseCategoricalCrossentropy&quot;,
      loss      : &quot;categoricalCrossentropy&quot;,
      optimizer : tf.train.adam(0.001),
      metrics   : ['acc']
  });
  </code></pre>
  <p>And when I trying to train the model I got this error.</p>
  <pre class="lang-js prettyprint-override"><code>const result = await model.fit(tf.ones([1, 1, 6]), tf.ones([1, 2]));
  
  Error: Argument tensors passed to stack must be a `Tensor[]` or `TensorLike[]`
  </code></pre>
  <p>I found a <a href="https://github.com/tensorflow/tfjs/issues/3550" rel="nofollow noreferrer">thread</a> about bug on github. But I don't think this is <code>tfjs</code> bug. Because that thread was more than a year ago. If it was a bug I'm pretty sure google fixed already. I think I did something wrong here. Also I tried exact same model in python and it's working fine... But I don't want to use python. I quit python many years ago since nodejs came out. I love javascript more than python and which is much easier to me maintaining. Can you help me understand what is wrong here?</p>