mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-11 12:31:23 +08:00
Param printing (#336)
* print thousands as K, M, B, T, ... * add option to print top-level modules only * added doc string and added spacing * do not print summary if neither "full" nor "top" * updated docs showing summary print options * fix line length for travis
This commit is contained in:
committed by
William Falcon
parent
ff2a21a08a
commit
6e3e740a7f
@@ -38,6 +38,14 @@ trainer = Trainer(overfit_pct=0.01)
|
||||
#### Print the parameter count by layer
|
||||
By default lightning prints a list of parameters *and submodules* when it starts training.
|
||||
|
||||
``` {.python}
|
||||
# DEFAULT print a full list of all submodules and their parameters.
|
||||
trainer = Trainer(weights_summary='full')
|
||||
|
||||
# only print the top-level modules (i.e. the children of LightningModule).
|
||||
trainer = Trainer(weights_summary='top')
|
||||
```
|
||||
|
||||
---
|
||||
#### Print which gradients are nan
|
||||
This option prints a list of tensors with nan gradients.
|
||||
|
||||
Reference in New Issue
Block a user