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

PReLU layers have large number of trainable parameters #2

Open
joseph-sch opened this issue Dec 3, 2019 · 0 comments
Open

PReLU layers have large number of trainable parameters #2

joseph-sch opened this issue Dec 3, 2019 · 0 comments

Comments

@joseph-sch
Copy link

In your current implementation, each PReLU layer has as many trainable parameters as the number of elements in the input (HxWxC) whereas in other implementations (deepinsight's insightface or TMaysGGS's MobileFaceNet-Keras have only one trainable parameter per channel.

Indeed, in Keras, the default argument for the shared_axes parameter of PReLU ("the axes along which to share learnable parameters for the activation function") is None. So you have to specify shared_axes=[1,2] in the calls to PReLU in order to keep the number of trainable parameters reasonable and match other implementations.

Reference: https://keras.io/layers/advanced-activations/

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

No branches or pull requests

1 participant