-
Hi Sebastian, Thanks for all your great learning resources. I've really enjoyed your course so far. I'm running into some trouble in the second exercise in Unit 5. The code I wrote for my custom callback is the following: ] class CustomCallback(Callback):
def on_train_epoch_end(self, trainer, lightning_model):
diff = lightning_model.val_acc['train_acc'] - lightning_model.val_acc['val_acc']
train_val_diff.append(diff) I know there is something wrong with the way I am computing the accuracies here because the list output is only the text describing the function type. However, I haven't found a way to compute them on the fly without having access to the predicted and actual labels. Could you offer any hints? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello Drew Gower, If you still need a hint, then pay attention to https://torchmetrics.readthedocs.io/en/stable/pages/implement.html. It helped me a lot. Good luck! |
Beta Was this translation helpful? Give feedback.
-
Ahh, sorry, for some reason the notification got buried in my email 😅. Am just seeing this! Sounds like it's not solved @dbg6y? If not pls let me know!! |
Beta Was this translation helpful? Give feedback.
Ahh, sorry, for some reason the notification got buried in my email 😅. Am just seeing this! Sounds like it's not solved @dbg6y? If not pls let me know!!