14 lines
338 B
Python
14 lines
338 B
Python
from pytorch_lightning.callbacks import Callback
|
|
|
|
|
|
class ExampleCallback(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')
|