Skip to content

Commit b19b155

Browse files
Felonious-Spellfirerohitgr7awaelchli
authored
Updated basic debugging (#14488)
Co-authored-by: Rohit Gupta <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]>
1 parent 291dc1b commit b19b155

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/source-pytorch/debug/debugging_basic.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,16 @@ To add the child modules to the summary add a :class:`~pytorch_lightning.callbac
128128

129129
trainer = Trainer(callbacks=[ModelSummary(max_depth=-1)])
130130

131+
To print the model summary if ``.fit()`` is not called:
132+
133+
.. code-block:: python
134+
135+
from pytorch_lightning.utilities.model_summary import ModelSummary
136+
137+
model = LitModel()
138+
summary = ModelSummary(model, max_depth=-1)
139+
print(summary)
140+
131141
To turn off the autosummary use:
132142

133143
.. code:: python

0 commit comments

Comments
 (0)