title: What are symbolic tensors, and why do they throw "use `steps_per_epoch` argument" error?
body: <p>Note: I already solved my issue, but I'm posting the question in case others have it too and because I don't understand how I solved it.</p>
  
  <p>I was building a Named Entity Classifier (sequence labelling model) in Keras with Tensorflow backend. When I tried to fit the model, I got this error (which, amazingly, returns only 4 Google results):</p>
  
  <pre><code>"If your data is in the form of symbolic tensors, you should specify the `steps_per_epoch` argument (instead of the batch_size argument, because symbolic tensors are expected to produce batches of input data)."
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/56242375/how-to-fix-symbolic-tensors-use-steps-per-epoch-but-not-batch-size-bug-in">This stackoverflow post</a> discussed the issue, and someone suggested to the op: </p>
  
  <blockquote>
    <p>one of your data tensors that is being used by Fit() is a symbolic tensor. The one hot label function returns a symbolic tensor. Try something like:</p>
  </blockquote>
  
  <pre><code>label_onehot = tf.Session().run(K.one_hot(label, 5))
  </code></pre>
  
  <p>Then I read on <a href="https://reference.wolfram.com/language/tutorial/SymbolicTensors.html" rel="nofollow noreferrer">this (not related) site</a>:</p>
  
  <blockquote>
    <p>The Wolfram System also has powerful algorithms to manipulate algebraic combinations of expressions representing [...] arrays. These expressions are called symbolic arrays or symbolic tensors.</p>
  </blockquote>
  
  <p>These two sources made me think symbolic arrays (at least in TensorFlow) might be something more like arrays of functions that are yet to be evaluated, rather than actual values.</p>
  
  <p>So, using <code>%whos</code> to view all my variables, I saw that my <code>X</code> and <code>Y</code> data were tensors (rather than arrays, like I normally use for my models). The data/info column had quite a complicated description for them, but I lost it once I solved my issue and I can't work out how to get back to the state where I was getting the error.</p>
  
  <p>In any case, I know I solved the problem by changing my data pre-processing so that the <code>X</code> and <code>y</code> data (i.e. <code>X_train</code> and <code>y_train</code>) were of type <code>&lt;class 'numpy.ndarray'&gt;</code> and of dimensions (num sents, max len) for <code>X_train</code> and (num_sents, max len, 1) for <code>y_train</code> (the 1 is necessary because my final layer expects 3D input). Now the model works fine. But I'm still wondering, what are these symbolic tensors and how/why is using steps per epoch instead of batch size supposed to help? I tried that too initially but had no luck.</p>