Pytorch, Torch, Torchvision, Deep Learning, Python.
torch.autograd import Variable x = torch.normal(mean=torch.arange(1., 11.), std=0.1) variable = Variable(x, requires_grad=True) print(variable) >> tensor([ 1.1980, 1.9739, 2.9814, 4.0895, 4.9490, 6.1402, 7.0451, 7.9064, 8.8287, 10.0382], requires_grad=True) Compute gradients As you already know,