Skip to content

Exercise 5.2 - Surprised by expected output #57

Answered by rasbt
spayot asked this question in Exercises
Discussion options

You must be logged in to vote

Glad to hear you are liking the Units so far! And wow, you are absolutely right. Not sure what I did there. Just fixed it!

Your results look good btw!

with that alternative approach, the (admittedly small) challenge becomes that our 3 calls to trainer.validate at the bottom of trainer.py also "trigger" the custom callback. would love to know if there is an appropriate way to get a callback to be called during the trainer.fit training loop, but not outside of said training loop.

That's a good point. Off the top of my head, I don't think there is an easy way. But one way to avoid the trigger here is to perhaps swap the lines

    train_acc = trainer.validate(dataloaders=dm.train_dataloader(…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by spayot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants