{ValueError}only one element tensors can be converted to Python scalars
gx,gy 为torch.tensor
np.array(gx,gy)就会报错
解决方法:np.array(np.array(gx),np.array(gy))
{ValueError}only one element tensors can be converted to Python scalars
gx,gy 为torch.tensor
np.array(gx,gy)就会报错
解决方法:np.array(np.array(gx),np.array(gy))