深度学习PyTorch实战(四)

上传:qq_75310 浏览: 20 推荐: 0 文件:PDF 大小:31.68KB 上传时间:2021-01-16 18:34:30 版权申诉
Pytorch Tensor基本运算 #加法运算 import torch a = torch.rand(3,4) b = torch.rand(4) #broadcasting机制 a+b tensor([[1.0349, 1.4042, 0.9662, 0.4812], [1.6120, 1.2008, 1.6819, 0.2741], [1.5190, 0.6663, 1.6405, 0.8839]]) torch.add(a,b) tensor([[1.0349, 1.4042, 0.9662, 0.4812], [1.6120,
上传资源
用户评论