Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. # evaluate the network
  2. print("[INFO] evaluating network...")
  3. predictions = model.predict(testX, batch_size=32)
  4. print(classification_report(testY.argmax(axis=1),
  5. predictions.argmax(axis=1), target_names=lb.classes_))
  6.  
  7. # plot the training loss and accuracy
  8. N = np.arange(0, EPOCHS)
  9. plt.style.use("ggplot")
  10. plt.figure()
  11. plt.plot(N, H.history["loss"], label="train_loss")
  12. plt.plot(N, H.history["val_loss"], label="val_loss")
  13. plt.plot(N, H.history["acc"], label="train_acc")
  14. plt.plot(N, H.history["val_acc"], label="val_acc")
  15. plt.title("Training Loss and Accuracy (SmallVGGNet)")
  16. plt.xlabel("Epoch #")
  17. plt.ylabel("Loss/Accuracy")
  18. plt.legend()
  19. plt.savefig("smallvggnet_plot.png")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement