document: fix callback signature (#2113)

This commit is contained in:
Pattarawat Chormai 2020-06-09 13:10:44 +02:00 committed by GitHub
parent 8d3d471f03
commit 3be557dc5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -238,10 +238,10 @@ Example::
from pytorch_lightning.callbacks import Callback
class PrintCallback(Callback):
def on_train_start(self):
def on_train_start(self, trainer, pl_module):
print("Training is started!")
def on_train_end(self):
print(f"Training is done. The logs are: {self.trainer.logs}")
def on_train_end(self, trainer, pl_module):
print("Training is done.")
check_val_every_n_epoch
^^^^^^^^^^^^^^^^^^^^^^^