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

[Fix]: Fix optimizer 'ValueError' when using PReLU activation. #2444

Merged
merged 3 commits into from
Dec 6, 2022

Conversation

KeiChiTse
Copy link
Contributor

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.

@CLAassistant
Copy link

CLAassistant commented Nov 22, 2022

CLA assistant check
All committers have signed the CLA.

@zhouzaida
Copy link
Collaborator

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Hi, thanks for your contribution. Please sign the CLA before we merge this PR.

@KeiChiTse
Copy link
Contributor Author

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Hi, thanks for your contribution. Please sign the CLA before we merge this PR.

Hi! I've signed the CLA license already!

@zhouzaida
Copy link
Collaborator

Hi, the lint failed and you can merge the upstream 2.x to fix the error.

@KeiChiTse
Copy link
Contributor Author

Hi, the lint failed and you can merge the upstream 2.x to fix the error.

图片
Hi! I wonder how can I fix this mypy hook error?

@zhouzaida
Copy link
Collaborator

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

@zhouzaida zhouzaida merged commit 6e81830 into open-mmlab:2.x Dec 6, 2022
tyomj pushed a commit to tyomj/mmcv that referenced this pull request May 8, 2023
…lab#2444)

* fix optimizer ValueError when using PReLU activation.

* fix lint error
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.

4 participants