model.py 文件源码

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

项目:ShuffleNet 作者: jaxony 项目源码 文件源码
def forward(self, x):
        # save for combining later with output
        residual = x

        if self.combine == 'concat':
            residual = F.avg_pool2d(residual, kernel_size=3, 
                stride=2, padding=1)

        out = self.g_conv_1x1_compress(x)
        out = channel_shuffle(out, self.groups)
        out = self.depthwise_conv3x3(out)
        out = self.bn_after_depthwise(out)
        out = self.g_conv_1x1_expand(out)

        out = self._combine_func(residual, out)
        return F.relu(out)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号