From f63fec9323c319720d78b452e9fe84b97ce7644e Mon Sep 17 00:00:00 2001 From: William Falcon Date: Sat, 7 Nov 2020 15:41:02 -0500 Subject: [PATCH] updated trainer docs (#4571) --- docs/source/new-project.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/source/new-project.rst b/docs/source/new-project.rst index fabc5cf6e5..e5ba47351a 100644 --- a/docs/source/new-project.rst +++ b/docs/source/new-project.rst @@ -608,7 +608,13 @@ Here's an example adding a not-so-fancy learning rate decay rule: new_lr_group.append(new_lr) param_group['lr'] = new_lr self.old_lrs[opt_idx] = new_lr_group - + +And pass the callback to the Trainer + +.. code-block:: python + + decay_callback = DecayLearningRate() + trainer = Trainer(callbacks=[decay_callback]) Things you can do with a callback: