The code I’ve posted should plot a single loss values for each epoch.
I assume you let your model train for 25 epochs, is that correct?
If so, the plots should show basically the same with the difference that the second plot shows the train and validation loss for each epoch.