
pytorch
杨三金
这个作者很懒,什么都没留下…
展开
-
查看pytorch版本
C:\Users\11834>python Python 3.6.3 |Anaconda, Inc.| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >...原创 2019-10-09 19:02:33 · 3554 阅读 · 0 评论 -
pytorch生成数据
torch.ones() 生成全部是一的张量 >>> import torch >>> torch.ones(3,3,2) tensor([[[1., 1.], [1., 1.], [1., 1.]], [[1., 1.], [1., 1.], [1., 1.]], ...原创 2019-10-21 18:48:35 · 698 阅读 · 0 评论 -
torch.unsqueeze
原型 torch.unsqueeze(input, dim, out=None) → Tensor 功能 在指定的位置增加一个维度 参数 input (Tensor) – 要增加维度的张量 dim (int) – 在哪个维度前,范围是[-input.dim() - 1, input.dim() + 1)] out (Tensor, optional) – 可选 输出的张量. 例子 >>...原创 2019-10-19 17:22:40 · 226 阅读 · 0 评论 -
torch.linspace
函数原型 torch.linspace(start, end, steps=100, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) → Tensor 功能 返回一个一维的张量 参数意义(一般只用前三个参数) start (float) – 起始点 end (float) – 结束点 ste...原创 2019-10-19 16:08:55 · 597 阅读 · 0 评论