Skip to content

Commit be6c17a

Browse files
committed
docs: update ModelSummary docstring.
1 parent b44a35b commit be6c17a

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/lightning/pytorch/utilities/model_summary/model_summary.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,29 +181,31 @@ class ModelSummary:
181181
...
182182
>>> model = LitModel()
183183
>>> ModelSummary(model, max_depth=1) # doctest: +NORMALIZE_WHITESPACE
184-
| Name | Type | Params | Mode | In sizes | Out sizes
185-
--------------------------------------------------------------------
186-
0 | net | Sequential | 132 K | train | [10, 256] | [10, 512]
187-
--------------------------------------------------------------------
184+
| Name | Type | Params | Mode | FLOPs | In sizes | Out sizes
185+
----------------------------------------------------------------------------
186+
0 | net | Sequential | 132 K | train | 2.6 M | [10, 256] | [10, 512]
187+
----------------------------------------------------------------------------
188188
132 K Trainable params
189189
0 Non-trainable params
190190
132 K Total params
191191
0.530 Total estimated model params size (MB)
192192
3 Modules in train mode
193193
0 Modules in eval mode
194+
2.6 M Total Flops
194195
>>> ModelSummary(model, max_depth=-1) # doctest: +NORMALIZE_WHITESPACE
195-
| Name | Type | Params | Mode | In sizes | Out sizes
196-
----------------------------------------------------------------------
197-
0 | net | Sequential | 132 K | train | [10, 256] | [10, 512]
198-
1 | net.0 | Linear | 131 K | train | [10, 256] | [10, 512]
199-
2 | net.1 | BatchNorm1d | 1.0 K | train | [10, 512] | [10, 512]
200-
----------------------------------------------------------------------
196+
| Name | Type | Params | Mode | FLOPs | In sizes | Out sizes
197+
------------------------------------------------------------------------------
198+
0 | net | Sequential | 132 K | train | 2.6 M | [10, 256] | [10, 512]
199+
1 | net.0 | Linear | 131 K | train | 2.6 M | [10, 256] | [10, 512]
200+
2 | net.1 | BatchNorm1d | 1.0 K | train | 0 | [10, 512] | [10, 512]
201+
------------------------------------------------------------------------------
201202
132 K Trainable params
202203
0 Non-trainable params
203204
132 K Total params
204205
0.530 Total estimated model params size (MB)
205206
3 Modules in train mode
206207
0 Modules in eval mode
208+
2.6 M Total Flops
207209
208210
"""
209211

0 commit comments

Comments
 (0)