-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add option to pass kernel_* and bias_* regularizers to Coral layer #17
Comments
Should the Coral layer inherit from Dense instead of Layer?
…-ck.mobile
On Mar 2, 2022, at 7:11 PM, Georg ***@***.***> wrote:
CORN layer inherits fromDense, so it all usual **kwargs can be passed.
Coral layer inherits from Layer, so kernel_regualizer/bias_regularizer (and other kwargs that would make sense for Coral) dont work as expected.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.
|
I don't think that will be as trivial, since AFAIU the point of the CORAL layer is that it is a specific (constrained) structure of a fully connected dense layer (which is what CORN solves), which requires overwriting the build method anyway -- so might as well just add the arguments to the inherited Layer class Looking at Dense() layer implementation, it should be straightforward to pass See https://github.com/keras-team/keras/blob/v2.8.0/keras/layers/core/dense.py#L147 This is mostly to support the same function signagure as a typical Dense layer that has bias/kernel weights. |
Belated response but thanks for the explanation on this! |
CORN layer inherits fromDense, so it all usual **kwargs can be passed.
Coral layer inherits from Layer, so kernel_regualizer/bias_regularizer (and other kwargs that would make sense for Coral) dont work as expected (passing them fails init since Layer does not recognized those kwarggs)
The text was updated successfully, but these errors were encountered: