convolution.py 文件源码

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

项目:keita 作者: iwasaki-kenta 项目源码 文件源码
def forward(self, inputs):
        """
        A 1D dilated convolution w/ padding such that the output
        is the same size as the input.

        :param inputs: (batch size, # channels, height)
        :return: (batch size, # channels, height)
        """
        x = F.pad(inputs.unsqueeze(2), (self.left_padding, 0, 0, 0)).squeeze(2)
        return super(CausalConv1d, self).forward(x)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号