Skip to content

Commit 5bd1ad1

Browse files
committed
Refactor test indent
1 parent 9cc289f commit 5bd1ad1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/test_inference.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
@pytest.mark.parametrize('model_name', list_models(exclude_filters='*efficientnet_l2*'))
99
@pytest.mark.parametrize('batch_size', [1])
1010
def test_model_forward(model_name, batch_size):
11-
"""Run a single forward pass with each model"""
12-
model = create_model(model_name, pretrained=False)
13-
model.eval()
11+
"""Run a single forward pass with each model"""
12+
model = create_model(model_name, pretrained=False)
13+
model.eval()
1414

15-
inputs = torch.randn((batch_size, *model.default_cfg['input_size']))
16-
outputs = model(inputs)
15+
inputs = torch.randn((batch_size, *model.default_cfg['input_size']))
16+
outputs = model(inputs)
1717

18-
assert outputs.shape[0] == batch_size
19-
assert not torch.isnan(outputs).any(), 'Output included NaNs'
18+
assert outputs.shape[0] == batch_size
19+
assert not torch.isnan(outputs).any(), 'Output included NaNs'

0 commit comments

Comments
 (0)