mirror of
https://github.com/aladdinpersson/Machine-Learning-Collection.git
synced 2026-02-21 11:18:01 +00:00
add lightning code, finetuning whisper, recommender system neural collaborative filtering
This commit is contained in:
12
ML/Pytorch/pytorch_lightning/7. Callbacks/callbacks.py
Normal file
12
ML/Pytorch/pytorch_lightning/7. Callbacks/callbacks.py
Normal file
@@ -0,0 +1,12 @@
|
||||
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.")
|
||||
|
||||
Reference in New Issue
Block a user