Commit d261e88
committed
docs(LightningModule): update docs for
Update the pseudocode of validation loop according to #18951:
> when the validation loop ends, and before switching to training, it
> restores the `.training mode` on all submodules to what it was before.
and add a corresponding note to `{validate,test,predict}_step`.
Additional changes:
* Fix incorrect comment in `lightning_module.rst` that
`trainer.test(model)` loads the best weights..training mode in loops1 parent 03635d2 commit d261e88
File tree
2 files changed
+22
-9
lines changed- docs/source-pytorch/common
- src/lightning/pytorch/core
2 files changed
+22
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
| |||
295 | 298 | | |
296 | 299 | | |
297 | 300 | | |
298 | | - | |
| 301 | + | |
299 | 302 | | |
300 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
301 | 306 | | |
302 | 307 | | |
303 | 308 | | |
| |||
368 | 373 | | |
369 | 374 | | |
370 | 375 | | |
371 | | - | |
| 376 | + | |
372 | 377 | | |
373 | 378 | | |
374 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
817 | | - | |
818 | | - | |
819 | | - | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
820 | 821 | | |
821 | 822 | | |
822 | 823 | | |
| |||
881 | 882 | | |
882 | 883 | | |
883 | 884 | | |
884 | | - | |
885 | | - | |
886 | | - | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
887 | 889 | | |
888 | 890 | | |
889 | 891 | | |
| |||
922 | 924 | | |
923 | 925 | | |
924 | 926 | | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
925 | 933 | | |
926 | 934 | | |
927 | 935 | | |
| |||
0 commit comments