Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # evaluate the network
- print("[INFO] evaluating network...")
- predictions = model.predict(testX, batch_size=32)
- print(classification_report(testY.argmax(axis=1),
- predictions.argmax(axis=1), target_names=lb.classes_))
- # plot the training loss and accuracy
- N = np.arange(0, EPOCHS)
- plt.style.use("ggplot")
- plt.figure()
- plt.plot(N, H.history["loss"], label="train_loss")
- plt.plot(N, H.history["val_loss"], label="val_loss")
- plt.plot(N, H.history["acc"], label="train_acc")
- plt.plot(N, H.history["val_acc"], label="val_acc")
- plt.title("Training Loss and Accuracy (SmallVGGNet)")
- plt.xlabel("Epoch #")
- plt.ylabel("Loss/Accuracy")
- plt.legend()
- plt.savefig("smallvggnet_plot.png")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement