mirror of
https://github.com/aladdinpersson/Machine-Learning-Collection.git
synced 2026-02-20 13:50:41 +00:00
13 lines
324 B
Python
13 lines
324 B
Python
from pytorch_lightning.callbacks import EarlyStopping, Callback
|
|
|
|
class MyPrintingCallback(Callback):
|
|
def __init__(self):
|
|
super().__init__()
|
|
|
|
def on_train_start(self, trainer, pl_module):
|
|
print("Starting to train!")
|
|
|
|
def on_train_end(self, trainer, pl_module):
|
|
print("Training is done.")
|
|
|