how to use the LightningModule.log to save the image #19081
Unanswered
FranticEr
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 0 comments
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.
-
I want to save the confusion matrix image of validation of each epoch, I try to
def validation_step(self,batch, *args: Any, **kwargs: Any) -> STEP_OUTPUT | None:
x,y=batch
# x=self.Flatten(x)
y_hat=self.Net(x)
loss=self.LossFunction(y_hat,y)
def on_test_epoch_end(self) -> None:
confusionMatrixImag=sns.heatmap(self.confusionMatrix)
self.log('confusionMatrixImage',confusionMatrixImag,on_epoch=True,on_step=False)
return super().on_test_epoch_end()
but it does not work I can't see the images in the tensorboard webui
Beta Was this translation helpful? Give feedback.
All reactions