Created
March 18, 2020 15:33
-
-
Save williamFalcon/a80a9e2910aaaecc722e3f9e8010e691 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytorch_lightning as pl | |
class MyLoggingCallback(pl.Callback): | |
def on_init_start(self, trainer): | |
trainer.logger.experiment.log_tensorboard_images(...) | |
def on_init_end(self, trainer): | |
trainer.logger.experiment.save_or_something(...) | |
def on_train_end(self, trainer, pl_module): | |
trainer.logger.experiment.log_something_else(...) | |
# pass to trainer | |
trainer = pl.Trainer(callbacks=[MyPrintingCallback()]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment