embedding_conv2d.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:Multitask-and-Transfer-Learning 作者: AI-ON 项目源码 文件源码
def __call__(self, id, x):
        W = self.W_embedding(id)
        b = F.squeeze(self.b_embedding(id))
        # Reshape the vector to be the right dimensions for 2D conv
        W = F.reshape(W, (self.out_channels, self.in_channels, self.kh, self.kw))
        return F.convolution_2d(x, W, b, self.stride, self.pad)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号