Hi,
Many thanks. Surprisingly it works. However I’m still confused, how can weight_real get the correct grad when weight has no grad? (I set a breakpoint on optimizer.step() and the grad of weight is None)