title: How to plot loss, val_loss as well as accuracy, val_accuracy without using history when I fit the model
body: <pre><code>model.fit(X_train, y_train, batch_size=mini_batch_size, epochs=nb_epochs, validation_data=(X_test, y_test))
  
  plt.title('Accuracy')
  plt.plot(model['accuracy'], label='train')
  plt.plot(model['val_accuracy'], label='test')
  plt.legend()
  plt.show()
  </code></pre>
  <p><em>ypeError: 'Functional' object is not subscriptable</em></p>
  <p><a href="https://i.stack.imgur.com/Urw0p.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Urw0p.jpg" alt="enter image description here" /></a></p>