import torch
import torch.autograd as autograd
# Variables wrap tensor objects
x = autograd.Variable(torch.Tensor([1., 2., 3]), requires_grad=True)
# You can access the data with the .data attribute
#print(x.data)
# You can also do all the same operations you did with tensors with Variables.
y = autograd.Variable(torch.Tensor([4., 5.,
pytorch中next_functions
最新推荐文章于 2024-06-03 14:50:23 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)