Good to hear it’s working now!
A small addition: don’t use the .data attribute, as it could yield unwanted side effects. Wrap the assignment in a with torch.no_grad() instead and assign the new values to the parameters.