Skip to content

Saving one single inference example per validation stage #10223

Discussion options

You must be logged in to vote

here:

x, y = (d.unsqueeze(0) for d in self.trainer.datamodule.valid_set.dataset_pair())

I think this is something not part of the dataloader, so PL won't move to the device automatically.
you can do:

x = x.to(self.device)
y_hat = self.model(x)
...

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@leoauri
Comment options

Answer selected by leoauri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment