Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Trainable = False for layers/embedding layer #333

Answered by szha
sravanbabuiitm asked this question in Q&A
Discussion options

You must be logged in to vote

you can do net.layer1.collect_params().setattr('grad_req', 'null') to freeze the weights in layer1.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by szha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #333 on August 30, 2020 19:15.