title: Invalid training data. For a recurrent layer with output mode 'last', responses must be a categorical column vector
body: <p>(I'm new to Matlab and am trying to build an LSTM)<br/>
  I've converted the Y into a categorical array:<br/>
      <code>labels = categorical(labels)
   net = trainNetwork(data, labels, layers, options);
  </code></p>
  
  <pre><code>labels =   3×1 categorical array
  1 
  0 
  0 
  </code></pre>
  
  <p>However still get the error Invalid training data. For a recurrent layer with output mode 'last', responses must be a categorical column vector.</p>