Suggestion on page 441 #124
Closed
baifanhorst
started this conversation in
General
Replies: 2 comments
-
Thank you for this suggestion! There's just one small mistake: "accuracy_train" was never defined. Instead, the second line should use "train_acc" as follows: self.log("train_acc", self.train_acc.compute()) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry for the late response and thanks for jumping in here explaining the issue. I am just catching up with my GitHub inbox and uploaded a fix here: #194 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In the definition of MultiLayerPerceptron on page 441, a function called 'training_epoch_end' is defined. However, this causes the following error:
NotImplementedError: Support for
training_epoch_end
has been removed in v2.0.0.MultiLayerPerceptron
implements this method. You can use theon_train_epoch_end
hook instead. To access outputs, save them in-memory as instance attributes. You can find migration examples in Lightning-AI/pytorch-lightning#16520.According to the error message, we need to replace the definition of 'training_epoch_end' by the following:
def on_train_epoch_end(self):
self.log("train_acc", self.accuracy_train.compute())
Beta Was this translation helpful? Give feedback.
All reactions