-
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 [email protected]:open-mmlab/mmcv.git
git pull open-mmlab 2.x |
…lab#2444) * fix optimizer ValueError when using PReLU activation. * fix lint error
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2.x #2444 +/- ##
==========================================
- Coverage 66.60% 66.59% -0.01%
==========================================
Files 120 120
Lines 7801 7799 -2
Branches 1067 1067
==========================================
- Hits 5196 5194 -2
Misses 2438 2438
Partials 167 167
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.