pytorch学习笔记
文章平均质量分 87
记录学习pytorch过程中的收获和疑问
蓝蓝地
这个作者很懒,什么都没留下…
展开
-
torch中tensor的乘法运算——matmul
乘法运算torch.matmul方法torch.matmul(input, other, *, out=None)→ Tensor维度相同的情况If both tensors are 1-dimensional, the dot product (scalar) is returned.均为1维tensor,则返回点积(标量)。If both arguments are 2-dimensional, the matrix-matrix product is returned.如果两原创 2021-12-27 20:49:37 · 2296 阅读 · 0 评论 -
torch.nn.module学习笔记
pytorch官网 Tutorials > Deep Learning with PyTorch: A 60 Minute Blitz > Neural Networks部分,对Define the network代码的几点疑问1. maxpooled为什么写在forward()方法中而不是net构造函数里?分析:使用maxpooled需要输入,且有输出,属于业务逻辑层,不宜写在构造函数中。2. 如图,输入图像转化为数据后size为32×32,其中Conv2d参数为(1, 6, kerne原创 2020-12-16 20:40:02 · 388 阅读 · 0 评论 -
pytorch学习笔记1
torch.randn_like()功能:保留原始tensor的size原创 2020-08-26 20:55:04 · 191 阅读 · 0 评论