-
Anyone can help me how to fix the parameters in the specific blocks? For example, I don't want to update parameters in the the below while other blocks run as usual. (0): Residual_Nick( |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You can collect all parameters of the Block with |
Beta Was this translation helpful? Give feedback.
-
Thanks a million, it works. |
Beta Was this translation helpful? Give feedback.
You can collect all parameters of the Block with
collect_params()
and then setp.grad_req = 'null'
for every parameterp
that you want to fix / freeze.https://github.com/apache/incubator-mxnet/blob/25ab7a61bfc59d2968c447a99427f29ff5158cf0/python/mxnet/gluon/parameter.py#L95-L98