File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def test_evaluate_constraints(model_and_input_func):
47
47
# NOTE: using param_num here instead of param_num_from_forward to check
48
48
# correctness of the function.
49
49
"params" : param_num (model , unit = 1.0 ),
50
- "flops" : profile_macs (model , args ) / 1.0 ,
50
+ "flops" : 2 * profile_macs (model , args ) / 1.0 ,
51
51
}
52
52
53
53
assert actual_results == expected_results
@@ -83,7 +83,7 @@ def test_percent_limits():
83
83
cf = ConstraintsFunc (model , constraints = constraints , dummy_input = args )
84
84
85
85
remove_bn (model )
86
- max_flops = profile_macs (model , args )
86
+ max_flops = 2 * profile_macs (model , args )
87
87
max_params = param_num (model , unit = 1.0 )
88
88
expected_results = {
89
89
# NOTE: using trainable_param_num here instead of trainable_param_num_from_forward to check
You can’t perform that action at this time.
0 commit comments