Skip to content

Commit

Permalink
Add flops calculation code
Browse files Browse the repository at this point in the history
  • Loading branch information
billl-jiang committed Mar 6, 2023
1 parent 3590786 commit 7e5b2d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/flops.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ def main():
# flops = FlopCountAnalysis(model, batch).total()
# print(flops)
# flops_lst.append(flops)
print('macs', macs/1e9)
print('flops', macs*2/1e9)
print('macs', macs/1e9, 'G')
return
macs_lst.append(macs)
params_lst.append(params)
Expand Down

0 comments on commit 7e5b2d8

Please sign in to comment.