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

Constraint on weights and bias #568

Closed
CatYukino opened this issue Mar 27, 2024 · 1 comment
Closed

Constraint on weights and bias #568

CatYukino opened this issue Mar 27, 2024 · 1 comment

Comments

@CatYukino
Copy link

Hi,

I'm new here so this may be a very easy question. Is there any way to restrict the weights and bias in the whole training process, like being nonnegative all the time? I just find in the doc that I can give a constraint on initial weights and bias, while I wonder if it is feasible in the whole process.

Thanks!

@avik-pal
Copy link
Member

I am not very up to date with the literature here, but typically, these constraints can be applied using a reparameterization. For example, you can have unconstrained weights but apply an exp transform before feeding it into your model.

@avik-pal avik-pal closed this as completed Apr 4, 2024
@avik-pal avik-pal closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
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