-
Notifications
You must be signed in to change notification settings - Fork 520
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
skip connection structure #2
Comments
Resnet flops calculated by the OpCOunter is smaller than the value in paper. |
Yes, as pytorch is a dynamic graph library, it is impossible to determine skip-connection structure at nn.Module level. One quick fix is to write a special judge for inverted residual block. I'll try to provide a more precise one via tracing computational graph. |
@Lyken17 In torch1.1, a new placeholder module is provided for this kind of awkward situation. As I can see, you should add this Module into And update your readme for special notice is important as well that one must use the standard module provided by PyTorch for skip connection to get an accurate FLOPs. |
not really. Most existing codebase still defines the identity connection in In this case, please have a look at my labmate's project zhijian-liu/onnx-profiler |
What you mentioned is quite right. I didn't say it would fix this problem without changing the codes. If someone would like to call your hook based op-counter while considering skip connection, he can represent skip connection with It is kind of a patch, not a global solution. By unify the model to onnx mode is a very interesting idea, I may look deeper into it some time. |
It is kind of like a user-defined patch, so I don't think you should update your project. |
It seems that the OpCounter doesn't take into account the skip connection structure.
The text was updated successfully, but these errors were encountered: