Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/gpu_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ def test_input_size_half_precision() -> None:
with pytest.warns(
UserWarning,
match=(
"Half precision is not supported with input_size parameter, and "
"may output incorrect results. Try passing input_data directly."
"Half precision is not officially supported with the `input_size` "
"parameter, as it may output incorrect size estimation results. We "
"recommend passing `input_data` directly."
),
):
summary(test, dtypes=[torch.float16], input_size=(10, 2), device="cuda")
Expand Down
5 changes: 3 additions & 2 deletions torchinfo/torchinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,9 @@ def validate_user_params(
):
if input_size is not None:
warnings.warn(
"Half precision is not supported with input_size parameter, and may "
"output incorrect results. Try passing input_data directly.",
"Half precision is not officially supported with the `input_size` "
"parameter, as it may output incorrect size estimation results. We "
"recommend passing `input_data` directly.",
stacklevel=2,
)
if device is not None and device.type == "cpu":
Expand Down
Loading