Created
March 20, 2021 21:40
-
-
Save adamoudad/94238542c3dbd31eef1d8392d6e7f9c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
epoch_history["loss"].append(sum(batch_history["loss"]) / len(batch_history["loss"])) | |
epoch_history["accuracy"].append(sum(batch_history["accuracy"]) / len(batch_history["accuracy"])) | |
model.eval() | |
print("Validation...") | |
val_loss, val_accuracy = validate(model, valid_loader) | |
epoch_history["val_loss"].append(val_loss) | |
epoch_history["val_accuracy"].append(val_accuracy) | |
print(f"{epoch_history=}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment