Skip to content

Commit 61b9abc

Browse files
committed
Revert "fix: aligning depth None with internal FlopCounterMode."
This reverts commit 4b7eddf.
1 parent 4b7eddf commit 61b9abc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def __init__(self, model: "pl.LightningModule", max_depth: int = 1) -> None:
220220
self._flop_counter = FlopCounterMode(
221221
mods=None if _TORCH_GREATER_EQUAL_2_4 else self._model,
222222
display=False,
223-
depth=max_depth + 1 if max_depth >= 0 else None,
223+
depth=max_depth + 1,
224224
)
225225

226226
self._max_depth = max_depth

0 commit comments

Comments
 (0)