You could check the .grad attribute of the frozen parameters after the backward() call and make sure it’s set to None. Additionally, you could also print the parameters before and after the optimizer.step() call to make sure they are not updated.