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)
embedding_conv2d.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录