Code:
ac = history.history[“accuracy”]
v_ac = history.history[“val_accuracy”]
loss = history.history[“loss”]
v_loss = history.history[“val_loss”]
epochs_range = range(5)
plt.figure(figsize=[8,8])
plt.subplot(121)
plt.plot(epochs_range,ac,label = “Training Accuracy”)
plt.plot(epochs_range,v_ac,label = “Validation Accuracy”)
plt.legend(loc = “lower right”)
plt.title(“Accuracy”)
plt.subplot(122)
plt.plot(epochs_range,loss,label = “Training loss”)
plt.plot(epochs_range,val_loss,label = “Validation loss” )
plt.legend(loc = “upper left”)
plt.title(“Loss”)
plt.show()
Can you tell how to correct this code