Noisy file detection method and its design #579
-
Hi, I want to detect noisy files after learning and get their paths and save them.
within the datamodule I am using Pytorch's ImageFolder class to generate the batch. However, I don't know how to access the datamodule from within the LightningModule class and how to specify the run folder generated by sensorboard. Also, I don't think the datamodule class and lightningmodule class should be tightly coupled in the first place.
We apologize for asking so many different questions at once, but we welcome any suggestions as long as they can be answered. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The cleanest approach would probably be to write a callback dedicated to saving those images (you can access both datamodule and lightningmodule inside the callback hooks). This way you could decouple datamodule-related behavior from ligtningmodule. |
Beta Was this translation helpful? Give feedback.
self.datamodule
inside LightningModule.on_test_end
hook is fineself.logger
(if there's one) orself.loggers
list (if you use many at once). Take a look at docs to see what tensorboard properties are accessible.The cleanest approach would probably be to write a callback dedicated to saving those images (you can access both datamodule and lightningmodule inside the callback hooks). This way you could decouple datamodule-related behavior from ligtningmodule.