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

Controlling the parameters W ,in Chain(Dense(),Dense()) neural network #1342

Closed
yewalenikhil65 opened this issue Sep 30, 2020 · 3 comments
Closed

Comments

@yewalenikhil65
Copy link

yewalenikhil65 commented Sep 30, 2020

Hello,

I wish to control the behaviour of model while training , based on a constraint on parameters that,

All the parameters (all elements of weight matrix W ) in input layer should stay positive while training the model.

Is this possible currently using Flux ?

@yewalenikhil65 yewalenikhil65 changed the title Controlling the parameters W and b in Chain(Dense()) neural network Controlling the parameters W and b in Chain(Dense(),Dense()) neural network Sep 30, 2020
@yewalenikhil65 yewalenikhil65 changed the title Controlling the parameters W and b in Chain(Dense(),Dense()) neural network Controlling the parameters W ,in Chain(Dense(),Dense()) neural network Sep 30, 2020
@CarloLucibello
Copy link
Member

This is similar to #942

I suggest you create a custom dense layer, where you reparametrize the weight as W = exp.(A), where A contains the parameters you actually train

@yewalenikhil65
Copy link
Author

yewalenikhil65 commented Oct 10, 2020

@CarloLucibello
Copy link
Member

closing as similar to #1389

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

2 participants