Hi, So you are missing one important part which is calling optimizer.step() after loss.backward(). The .backward function merely computes the gradients of each parameter with respect to the loss, it is the .step() function that actually applies the updates to the parameters.  Also doing optimizer.zero_grad() will set the gradients to 0, there is no need to call rotation_matrix.zero_grad()  after it.