Closed Spark001 closed 3 years ago
The flops of ConvTranspose2d operation maybe not correct?
It should be calculated as same as Conv2d: K_w*K_h*C_in*C_out*O_w*O_h when group = 1.
K_w*K_h*C_in*C_out*O_w*O_h
However your implement is K_w*K_h*C_in*C_out*I_w*I_h as follows:
K_w*K_h*C_in*C_out*I_w*I_h
https://github.com/sovrasov/flops-counter.pytorch/blob/b35716da617b57cb96944b113928d54b8b9ee9b6/ptflops/flops_counter.py#L297
Indeed, that's a bug. Thanks for figuring out, I'll fix it.
Resolved in #58
The flops of ConvTranspose2d operation maybe not correct?
It should be calculated as same as Conv2d:
K_w*K_h*C_in*C_out*O_w*O_h
when group = 1.However your implement is
K_w*K_h*C_in*C_out*I_w*I_h
as follows:https://github.com/sovrasov/flops-counter.pytorch/blob/b35716da617b57cb96944b113928d54b8b9ee9b6/ptflops/flops_counter.py#L297