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

use graph transform to deal with more general cases for efficient_conv_bn_eval #1259

Merged
merged 1 commit into from Jul 26, 2023

Conversation

youkaichao
Copy link
Contributor

Motivation

Prior to this PR, efficient_conv_bn_eval operates in module level. It modifies the forward function of conv and bn modules. Therefore, it cannot deal with multiple usage of conv.

This PR improves the efficient_conv_bn_eval feature to operate in computation level. We fuse each computation of conv and bn. No changes in state_dict, no constraints for the network architecture. As long as there are conv + bn in eval computation patterns, this PR works.

See the updated test for example.

BC-breaking (Optional)

No. It just changes the implementation of efficient_conv_bn_eval.

@zhouzaida zhouzaida merged commit ee742da into open-mmlab:main Jul 26, 2023
16 of 19 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants