fix flake8

pull/2/head
lixiaojie 2020-06-03 15:54:37 +08:00
parent 2aaff0e4f2
commit 83cc9fc279
3 changed files with 5 additions and 6 deletions

View File

@ -2,4 +2,4 @@ from .mobilenet_v2 import MobileNetv2
__all__ = [
'MobileNetv2',
]
]

View File

@ -3,7 +3,7 @@ import logging
import torch.nn as nn
import torch.utils.checkpoint as cp
# from ..runner import load_checkpoint
from ..runner import load_checkpoint
from .base_backbone import BaseBackbone
from .weight_init import constant_init, kaiming_init
@ -210,7 +210,9 @@ class MobileNetv2(BaseBackbone):
self.out_channel = int(self.out_channel * widen_factor) \
if widen_factor > 1.0 else self.out_channel
self.conv_last = nn.Conv2d(self.inplanes, self.out_channel, 1, 1, 0, bias=False)
self.conv_last = nn.Conv2d(self.inplanes,
self.out_channel,
1, 1, 0, bias=False)
self.bn_last = nn.BatchNorm2d(self.out_channel)
self.feat_dim = self.out_channel

View File

@ -1,8 +1,5 @@
import pytest
import torch
import torch.nn as nn
from torch.nn.modules import AvgPool2d, GroupNorm
from torch.nn.modules.batchnorm import _BatchNorm
from mmcls.models.backbones import MobileNetv2