![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Pytorch
daydayup58
这个作者很懒,什么都没留下…
展开
-
Pytorch handbook
Pytorch 中文文档https://pytorch-cn.readthedocs.io/zh/latest/package_references/torch/Pytorch Tutorialhttps://pytorch.org/tutorials/index.htmlPyTorch官方教程中文版http://www.pytorch123.com/...原创 2020-09-11 12:54:02 · 240 阅读 · 0 评论 -
pytorch 扩充Tensor的维度
dataloader读进来的数据标签是torch.Size([n]),需要和数据做torch.cat操作,要保持两者的维度一致,变成torch.Size([n, 1])代码举例import torchimport numpy as nplabel = torch.randperm(5)print(label) # tensor([1, 3, 0, 4, 2])print(label...原创 2019-11-25 15:28:40 · 8309 阅读 · 0 评论