title: Is there a difference between the keras' implementation of the categorical cross entropy and the actual one?
body: <p>Those two lines produce different results while training </p>
  
  <pre><code>loss = tf.reduce_mean(tf.keras.losses.categorical_crossentropy(answers_matrix, predictions_matrix))   
  </code></pre>
  
  <p>and</p>
  
  <pre><code>loss = -tf.reduce_mean(answers_matrix * tf.log(predictions_matrix))
  </code></pre>
  
  <p>I want to visualize the loss during the training so I want to print the mean of losses over the entire batch and over the sequence length. without taking the mean, the resulting loss would be of shape (batch_size, sequence_length)  </p>
  
  <p>The second line gives me WAY better results while training/optimizing the neural network.<br>
  I use keras with tensorflow backend</p>