I have a net that do not use the embedding, or rnn module. I just create a Variable, but is seems that the variable does not change itself during the training. How can adjust the variable
I want to tune the variable.
I have a net that do not use the embedding, or rnn module. I just create a Variable, but is seems that the variable does not change itself during the training. How can adjust the variable
I want to tune the variable.
You are a bit vague but maybe you forgot to set requires_grad
?:
v = Variable(..., requires_grad=True)
Thank you, I just found what I’m looking for, the nn.Parameter, a kind of Variable, it can be added into the model’s parameters() default.