pytorch
松果体
这个作者很懒,什么都没留下…
展开
-
torch.nn.Embedding模块
torch.nn.Embedding模块定义作用形式实例定义官方原文:A simple lookup table that stores embeddings of a fixed dictionary and size.翻译:一个保存了固定嵌入向量字典和大小的简单查找表。简单总结:fixed embeddings dictionary作用官方原文:This module is often used to store word embeddings and retrieve them using原创 2020-06-29 19:51:53 · 947 阅读 · 0 评论 -
pytorch中的torch.nn.Unfold和torch.nn.Fold
pytorch中的torch.nn.Unfold和torch.nn.Fold目的Unfold目的平时使用卷积操作时,既卷积核滑动窗口操作,对于pytorch,以二维图像为例,调用nn.Conv2d就能完成对输入(feature maps)的卷积操作。但有时,maybe要探究卷积核对应的某一channel的单个窗口的卷积操作,或显式地进行卷积操作。此时,就需要nn.Unfold和nn.Fold。前段时间引起较大争议的BagNet(Bag of local feature net)的分块卷积操作既由此函数原创 2020-06-11 19:25:25 · 20687 阅读 · 9 评论