摘要: 一 code: import torch x = torch.ones(2, 2, requires_grad=True) y = x + 2 z = y y 3 out = z.mean() out.backward() print(x.grad) 输出结果: tensor([[4.5000, 4 阅读全文
posted @ 2019-12-06 13:15 叶十一 阅读(210) 评论(0) 推荐(0)