updated trainer docs (#4571)
This commit is contained in:
parent
e0bdf8124b
commit
f63fec9323
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in New Issue