so, if I want change the gradient manually in optimizer, must I using the following program?
for group in meta_optim.param_groups:  # meta_optim is optimizer
     for p,g in zip(group['params'], grads):  # grads were calculated manually.
         if p.grad is not None:
             p._grad.data = g.data # rather than p.grad.data=g.data?
meta_optim.step()