Created
March 18, 2020 15:31
-
-
Save williamFalcon/214d5b7e92301b19783e6456e9f1dfc7 to your computer and use it in GitHub Desktop.
This file contains 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 MyPrintingCallback(pl.Callback): | |
def on_init_start(self, trainer): | |
print('Starting to init trainer!') | |
def on_init_end(self, trainer): | |
print('trainer is init now') | |
def on_train_end(self, trainer, pl_module): | |
print('do something when training ends') | |
# 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