Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fixing some parameters in NN #19290

Answered by leezu
ngkim823 asked this question in General
Oct 5, 2020 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

You can collect all parameters of the Block with collect_params() and then set p.grad_req = 'null' for every parameter p that you want to fix / freeze.

https://github.com/apache/incubator-mxnet/blob/25ab7a61bfc59d2968c447a99427f29ff5158cf0/python/mxnet/gluon/parameter.py#L95-L98

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by szha
Comment options

You must be logged in to vote
2 replies
@leezu
Comment options

@ngkim823
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants