File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 88@pytest .mark .parametrize ('model_name' , list_models (exclude_filters = '*efficientnet_l2*' ))
99@pytest .mark .parametrize ('batch_size' , [1 ])
1010def 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'
You can’t perform that action at this time.
0 commit comments