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:
Adrian Wälchli
2019-10-08 15:30:06 -04:00
committed by William Falcon
parent ff2a21a08a
commit 6e3e740a7f
4 changed files with 63 additions and 19 deletions
+8
View File
@@ -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.