@@ -39,7 +39,7 @@ class FCN(BaseNet):
3939 >>> print(model)
4040 """
4141 def __init__ (self , nclass , backbone , aux = True , se_loss = False , norm_layer = nn .BatchNorm2d , ** kwargs ):
42- super (FCN , self ).__init__ (nclass , backbone , aux , se_loss , norm_layer = norm_layer )
42+ super (FCN , self ).__init__ (nclass , backbone , aux , se_loss , norm_layer = norm_layer , ** kwargs )
4343 self .head = FCNHead (2048 , nclass , norm_layer )
4444 if aux :
4545 self .auxlayer = FCNHead (1024 , nclass , norm_layer )
@@ -97,7 +97,7 @@ def get_fcn(dataset='pascal_voc', backbone='resnet50', pretrained=False,
9797 }
9898 # infer number of classes
9999 from ..datasets import datasets , VOCSegmentation , VOCAugSegmentation , ADE20KSegmentation
100- model = FCN (datasets [dataset .lower ()].NUM_CLASS , backbone = backbone , ** kwargs )
100+ model = FCN (datasets [dataset .lower ()].NUM_CLASS , backbone = backbone , root = root , ** kwargs )
101101 if pretrained :
102102 from .model_store import get_model_file
103103 model .load_state_dict (torch .load (
@@ -122,7 +122,7 @@ def get_fcn_resnet50_pcontext(pretrained=False, root='~/.encoding/models', **kwa
122122 >>> model = get_fcn_resnet50_pcontext(pretrained=True)
123123 >>> print(model)
124124 """
125- return get_fcn ('pcontext' , 'resnet50' , pretrained , aux = False , ** kwargs )
125+ return get_fcn ('pcontext' , 'resnet50' , pretrained , root = root , aux = False , ** kwargs )
126126
127127def get_fcn_resnet50_ade (pretrained = False , root = '~/.encoding/models' , ** kwargs ):
128128 r"""EncNet-PSP model from the paper `"Context Encoding for Semantic Segmentation"
@@ -141,4 +141,4 @@ def get_fcn_resnet50_ade(pretrained=False, root='~/.encoding/models', **kwargs):
141141 >>> model = get_fcn_resnet50_ade(pretrained=True)
142142 >>> print(model)
143143 """
144- return get_fcn ('ade20k' , 'resnet50' , pretrained , ** kwargs )
144+ return get_fcn ('ade20k' , 'resnet50' , pretrained , root = root , ** kwargs )
0 commit comments