-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Fix]: Fix optimizer 'ValueError' when using PReLU activation. #2444
Conversation
Hi, thanks for your contribution. Please sign the CLA before we merge this PR. |
Hi! I've signed the CLA license already! |
Hi, the lint failed and you can merge the upstream 2.x to fix the error. |
Hi, you can use the following commands to fix the mypy error. git remote add open-mmlab git@github.com:open-mmlab/mmcv.git
git pull open-mmlab 2.x |
…lab#2444) * fix optimizer ValueError when using PReLU activation. * fix lint error
Motivation
When using parameterized activation like PReLU in FFN, current way of initializing activation functions will cause a 'ValueError' in optimizer.
i.e.
ValueError: some parameters appear in more than one parameter group
Modification
Call 'build_activation_layer' function repeatedly instead of using 'self.activate' multiple times.