One of the variables needed for gradient computation has been modified by an inplace operation. reset_net(s_model)’, everything goes well.