lightning/docs/source/hooks.rst

57 lines
875 B
ReStructuredText
Raw Normal View History

Hooks
-----
2020-02-27 12:35:20 +00:00
.. automodule:: pytorch_lightning.core.hooks
Full list of hooks
Training set-up
================
- init_ddp_connection
- init_optimizers
- configure_apex
- configure_ddp
Clean up dataloader logic (#926) * added get dataloaders directly using a getter * deleted decorator * added prepare_data hook * refactored dataloader init * refactored dataloader init * added dataloader reset flag and main loop * added dataloader reset flag and main loop * added dataloader reset flag and main loop * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * made changes * fixed bad loaders * fixed bad loaders * fixed bad loaders * fixed bad loaders * fixed bad loaders * fixed bad loaders * fixed bad loaders * fixed bad loaders * fixed bad loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixed error in .fit with loaders * fixes #909 * fixes #909 * bug fix * Fixes #902
2020-02-25 03:23:25 +00:00
- train_dataloader
- test_dataloaders
- val_dataloaders
- summarize
- restore_weights
Training loop
2020-02-27 12:35:20 +00:00
=============
- on_epoch_start
- on_batch_start
- tbptt_split_batch
- training_step
- training_end (optional)
- backward
- on_after_backward
- optimizer.step()
- on_batch_end
- on_epoch_end
Validation loop
2020-02-27 12:35:20 +00:00
===============
- model.zero_grad()
- model.eval()
- torch.set_grad_enabled(False)
- validation_step
- validation_end
- model.train()
- torch.set_grad_enabled(True)
- on_post_performance_check
Test loop
2020-02-27 12:35:20 +00:00
=========
- model.zero_grad()
- model.eval()
- torch.set_grad_enabled(False)
- test_step
- test_end
- model.train()
- torch.set_grad_enabled(True)
- on_post_performance_check