Lack of gradient when creating tensor from numpy

后端 未结 0 1754
有刺的猬
有刺的猬 2021-01-02 00:23

Can someone please explain to me the following behavior?

import torch
import numpy as np

z = torch.tensor(np.array([1., 1.]), requires_grad=True).float()

de         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题