Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

计算FLOPs相关 #50

Closed
aoaforever opened this issue Oct 17, 2022 · 1 comment
Closed

计算FLOPs相关 #50

aoaforever opened this issue Oct 17, 2022 · 1 comment

Comments

@aoaforever
Copy link

您好!我有两个问题需要请教:

  1. 请问代码里为什么需要除以sum(num_ress) ?
  2. 为什么对FRCNN网络的flops还需要加上7.4 ?
    期待您的解答,谢谢!!
def cal_FLOPs(which_model,num_ress):
    if which_model =='classSR_3class_fsrcnn_net':
        flops = ((141 * num_ress[0] + 304 * num_ress[1] + 468 * num_ress[2]) / sum(num_ress))+7.4
        percent=flops/468
    elif which_model=='classSR_3class_carn':
        flops = (0.38 * num_ress[0] + 0.77 * num_ress[1] + 1.15 * num_ress[2]) / sum(num_ress)
        percent = flops / 1.15
    elif which_model=='classSR_3class_srresnet':
        flops = (1.66 * num_ress[0] + 3.44 * num_ress[1] + 5.20 * num_ress[2]) / sum(num_ress)
        percent = flops / 5.20
    elif which_model=='classSR_3class_rcan':
        flops = (10.33 * num_ress[0] + 19.90 * num_ress[1] + 32.60 * num_ress[2]) / sum(num_ress)
        percent = flops / 32.60
    return flops,percent
@Xiangtaokong
Copy link
Member

Xiangtaokong commented Oct 17, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants