mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-17 12:40:36 +08:00
Update hooks.md
This commit is contained in:
@@ -4,11 +4,10 @@
|
|||||||
There are cases when you might want to do something different at different parts of the training/validation loop.
|
There are cases when you might want to do something different at different parts of the training/validation loop.
|
||||||
To enable a hook, simply override the method in your LightningModule and the trainer will call it at the correct time.
|
To enable a hook, simply override the method in your LightningModule and the trainer will call it at the correct time.
|
||||||
|
|
||||||
**Contributing** If there's a hook you'd like to add, simply:
|
**Contributing** If there's a hook you'd like to add, simply:
|
||||||
1. Fork PytorchLightning.
|
1. Fork PytorchLightning.
|
||||||
2. Add the hook [here](https://github.com/williamFalcon/pytorch-lightning/blob/master/pytorch_lightning/root_module/hooks.py).
|
2. Add the hook [here](https://github.com/williamFalcon/pytorch-lightning/blob/master/pytorch_lightning/root_module/hooks.py).
|
||||||
3. Add the correct place in the [Trainer](https://github.com/williamFalcon/pytorch-lightning/blob/master/pytorch_lightning/models/trainer.py)
|
3. Add the correct place in the [Trainer](https://github.com/williamFalcon/pytorch-lightning/blob/master/pytorch_lightning/models/trainer.py) where it should be called.
|
||||||
where it should be called.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
#### on_epoch_start
|
#### on_epoch_start
|
||||||
|
|||||||
Reference in New Issue
Block a user