Pytorch
文章平均质量分 57
深度学习与Pytorch
yaked19
这个作者很懒,什么都没留下…
展开
-
动手学深度学习:数据基本操作(创建、索引、合并、python转换)
中文版官网:http://courses.d2l.ai/zh-v2/英文版官网:1. 创建import torchx=torch.arange(12,dtype=torch.float32).reshape((3,4))torch.tensor([[2, 1, 4, 3], [1, 2, 3, 4], [4, 3, 2, 1]])x = torch.arange(12) # 0~11x.shapex.size()x = x.reshape((3, 4))...原创 2021-03-21 13:43:46 · 168 阅读 · 1 评论 -
Pytorch小迈步
查看pytorch版本import torchprint(torch.__version__)查看pytorch是CUDA版还是CPU版import torchprint(torch.cuda.is_available())a = 3b = 4c = (a ** 2 + b ** 2) ** 0.5cp = lambda a,b: (a**2 + b**2) ** 0.5p(1,2)a = InputParameterPlaceholder()b = ..原创 2020-06-20 11:43:11 · 271 阅读 · 0 评论