-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Set specific weights to non-trainable instead of the whole layer #47597
Comments
@iliaschalkidis, |
Hi @amahendrakar, Unfortunately not. In this example, we just do not use a bias term at all. In my case, I just want to pick up a specific weight, for example, the bias term or the Thanks. |
Perhaps you can set arg |
Hi @ymodak, @amahendrakar already proposed this solution and this is not the case. If we set Thanks. |
It's a vital function and it's interesting that it still doesn't. |
@ymodak |
@iliaschalkidis This is more of a feature (and not a bug with TF/keras) If you still interested in this feature, open the issue as a feature in keras-team/keras repo as Keras development moved there to focus entirely on Keras. Also, mention more details about your use case where you would like to have this functionality. Keras development moved to another repository to focus on only keras. Could you please repost this issue on keras-team/keras repo. |
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you. |
Closing as stale. Please reopen if you'd like to work on this further. |
I almost had the same problem and I solved it this way : It was useful for me in order to prevent depthwise weights to train in a SeparableConv1D. |
I'm trying to find a way to turn specific weights (variables) from trainable to non-trainable. For example, let's say I load a pre-trained model that includes a
Dense
layer and want to keep theW
matrix trainable while disabling the bias term.I see only examples of how to turn a whole layer:
Returns:
What if, I want to do something like:
This returns the error:
The text was updated successfully, but these errors were encountered: