Skip to content
Open
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
13 changes: 4 additions & 9 deletions tests/test_flop_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,10 +724,8 @@ def test_batchnorm(self) -> None:
)

# Test for BatchNorm2d.
batch_size = 10
input_dim = 10
spatial_dim_x = 5
spatial_dim_y = 5
batch_size = input_dim = 10
spatial_dim_x = spatial_dim_y = 5
batch_2d = nn.BatchNorm2d(input_dim, affine=False)
x = torch.randn(batch_size, input_dim, spatial_dim_x, spatial_dim_y)
flop_dict, _ = flop_count(batch_2d, (x,))
Expand All @@ -739,11 +737,8 @@ def test_batchnorm(self) -> None:
)

# Test for BatchNorm3d.
batch_size = 10
input_dim = 10
spatial_dim_x = 5
spatial_dim_y = 5
spatial_dim_z = 5
batch_size = input_dim = 10
spatial_dim_x = spatial_dim_y = spatial_dim_z = 5
batch_3d = nn.BatchNorm3d(input_dim, affine=False)
x = torch.randn(
batch_size, input_dim, spatial_dim_x, spatial_dim_y, spatial_dim_z
Expand Down