title: NameError: name 'example_batch_predictions' is not defined
body: <p>I was running a code and I received this error. The code is below.</p>
  <pre><code>for input_example_batch, target_example_batch in dataset.take(1): 
  example_batch_predictions = model(input_example_batch)
  print(example_batch_predictions.shape,&quot;(BATCH_SIZE, sequence_length,vocab_size)&quot;)
  
  model.summary()
  
  sampled_indices = tf.random.categorical(example_batch_predictions,num_samples=1)
  sampled_indices = tf.squeeze(sampled_indices,axis=-1).numpy()
  </code></pre>
  <p>and the error i recieved is</p>
  <blockquote>
  <p>NameError Traceback (most recent call last) ipython-input-45-f7c2773af286&gt; in module()
  sampled_indices = tf.random.categorical(example_batch_predictions, num_samples=1)
  sampled_indices = tf.squeeze(sampled_indices,axis=-1).numpy()</p>
  <p>NameError: name 'example_batch_predictions' is not defined</p>
  </blockquote>