案例1
import torch
torch.__version__
xtorch.rand(3,4,requires_gradTrue)
xtensor([[0.9795, 0.8240, 0.6395, 0.1617],[0.4833, 0.4409, 0.3758, 0.7234],[0.9857, 0.9663, 0.5842, 0.8751]], requires_gradTrue)btorch.rand(3,4,requires_gradTrue)
txb
yt.sum()y.backwa…