The following works:
foo = nn.Parameter( torch.randn(4) )
model.hidden.bias = foo
However when I change it to this:
bar = model.hidden.bias
bar = nn.Parameter( torch.randn(4) )
it doesn’t seem like the bias parameter within the model actually updates, but only the local variable bar changes.
How can I create a sort of “pointer” to the bias parameter so that I can set it?