Skip to content

Commit 81826ed

Browse files
authored
Fix FLOPs calculation
Signed-off-by: Mohammed Yasin <[email protected]>
1 parent 615f3c0 commit 81826ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modelopt/torch/nas/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def inference_flops(
116116
with warnings.catch_warnings():
117117
warnings.simplefilter("ignore")
118118
with batch_norm_ignored_flops():
119-
flops = profile.profile_macs(network, args=dummy_input)
119+
flops = 2 * profile.profile_macs(network, args=dummy_input)
120120
network.train(is_training)
121121
if return_str:
122122
return num2hrb(flops)

0 commit comments

Comments
 (0)