densenet.py 文件源码

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

项目:Bilinear_CNN_dog_classifi 作者: chencodeX 项目源码 文件源码
def forward(self, x):
        # x = x.clone()
        x[:, 0] = (x[:, 0] - 0.485) / 0.229
        x[:, 1] = (x[:, 1] - 0.456) / 0.224
        x[:, 2] = (x[:, 2] - 0.406) / 0.225
        features = self.features(x)
        # temp_size = features.size(0)
        out = F.relu(features, inplace=True)
        out = F.avg_pool2d(out, kernel_size=7).view(features.size(0), -1)
        ft = out.clone()
        out = self.classifier(out)
        return out,ft
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号