MCPcopy Create free account
hub / github.com/lukemelas/EfficientNet-PyTorch / test_forward

Function test_forward

tests/test_model.py:30–34  ·  view source on GitHub ↗

Test `.forward()` doesn't throw an error

(net, img_size)

Source from the content-addressed store, hash-verified

28
29@pytest.mark.parametrize('img_size', [224, 256, 512])
30def test_forward(net, img_size):
31 """Test `.forward()` doesn't throw an error"""
32 data = torch.zeros((1, 3, img_size, img_size))
33 output = net(data)
34 assert not torch.isnan(output).any()
35
36
37def test_dropout_training(net):

Callers

nothing calls this directly

Calls 1

netFunction · 0.85

Tested by

no test coverage detected