Unverified Commit 2686e1a3 authored by Francisco Massa's avatar Francisco Massa Committed by GitHub
Browse files

Fix lint (#837)

parent 9abf0a34
......@@ -32,7 +32,8 @@ def googlenet(pretrained=False, **kwargs):
if 'aux_logits' not in kwargs:
kwargs['aux_logits'] = False
if kwargs['aux_logits']:
warnings.warn('auxiliary heads in the pretrained googlenet model are NOT pretrained, so make sure to train them')
warnings.warn('auxiliary heads in the pretrained googlenet model are NOT pretrained, '
'so make sure to train them')
original_aux_logits = kwargs['aux_logits']
kwargs['aux_logits'] = True
kwargs['init_weights'] = False
......
......@@ -107,7 +107,7 @@ class Bottleneck(nn.Module):
class ResNet(nn.Module):
def __init__(self, block, layers, num_classes=1000, zero_init_residual=False,
groups=1,width_per_group=64, norm_layer=None):
groups=1, width_per_group=64, norm_layer=None):
super(ResNet, self).__init__()
if norm_layer is None:
norm_layer = nn.BatchNorm2d
......@@ -240,13 +240,13 @@ def resnet152(pretrained=False, **kwargs):
def resnext50_32x4d(pretrained=False, **kwargs):
model = ResNet(Bottleneck, [3, 4, 6, 3], groups=4, width_per_group=32, **kwargs)
#if pretrained:
# if pretrained:
# model.load_state_dict(model_zoo.load_url(model_urls['resnet50']))
return model
def resnext101_32x8d(pretrained=False, **kwargs):
model = ResNet(Bottleneck, [3, 4, 23, 3], groups=8, width_per_group=32, **kwargs)
#if pretrained:
# if pretrained:
# model.load_state_dict(model_zoo.load_url(model_urls['resnet50']))
return model
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment