b2074ddf9d8bc2069d66976fea58a52f40238496,pretrainedmodels/nasnet.py,ReductionCell0,__init__,#ReductionCell0#Any#Any#Any#Any#,278

Before Change


    def __init__(self, in_channels_left=1008, out_channels_left=336,
                       in_channels_right=1008, out_channels_right=336):
        super(ReductionCell0, self).__init__()
        self.conv_left = nn.Conv2d(in_channels_left, out_channels_left, 1, stride=1, bias=False)
        self.bn_left = nn.BatchNorm2d(out_channels_left, eps=0.001, momentum=0.1, affine=True)
        
        self.conv_right = nn.Conv2d(in_channels_right, out_channels_right, 1, stride=1, bias=False)
        self.bn_right = nn.BatchNorm2d(out_channels_right, eps=0.001, momentum=0.1, affine=True)
        
        self.comb_iter_0_left = TwoSeparables(out_channels_right, out_channels_right, 5, 2, 2, bias=False)
        self.comb_iter_0_right = TwoSeparables(out_channels_right, out_channels_right, 7, 2, 3, bias=False)

        self.comb_iter_1_left = nn.MaxPool2d(3, stride=2, padding=1)
        self.comb_iter_1_right = TwoSeparables(out_channels_right, out_channels_right, 7, 2, 3, bias=False)

        self.comb_iter_2_left = nn.AvgPool2d(3, stride=2, padding=1)
        self.comb_iter_2_right = TwoSeparables(out_channels_right, out_channels_right, 5, 2, 2, bias=False)

After Change



class ReductionCell0(nn.Module):
    
    def __init__(self, in_channels_left, out_channels_left, in_channels_right, out_channels_right):
        super(ReductionCell0, self).__init__() 
        self.conv_prev_1x1 = nn.Sequential()
        self.conv_prev_1x1.add_module("relu", nn.ReLU())
        self.conv_prev_1x1.add_module("conv", nn.Conv2d(in_channels_left, out_channels_left, 1, stride=1, bias=False))
        self.conv_prev_1x1.add_module("bn", nn.BatchNorm2d(out_channels_left, eps=0.001, momentum=0.1, affine=True))

        self.conv_1x1 = nn.Sequential()
        self.conv_1x1.add_module("relu", nn.ReLU())
        self.conv_1x1.add_module("conv", nn.Conv2d(in_channels_right, out_channels_right, 1, stride=1, bias=False))
        self.conv_1x1.add_module("bn", nn.BatchNorm2d(out_channels_right, eps=0.001, momentum=0.1, affine=True))

        self.comb_iter_0_left = BranchSeparablesReduction(out_channels_right, out_channels_right, 5, 2, 2, bias=False)
        self.comb_iter_0_right = BranchSeparablesReduction(out_channels_right, out_channels_right, 7, 2, 3, bias=False)

        self.comb_iter_1_left = MaxPoolPad()
        self.comb_iter_1_right = BranchSeparablesReduction(out_channels_right, out_channels_right, 7, 2, 3, bias=False)

        self.comb_iter_2_left = AvgPoolPad()
        self.comb_iter_2_right = BranchSeparablesReduction(out_channels_right, out_channels_right, 5, 2, 2, bias=False)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 26

Instances


Project Name: Cadene/pretrained-models.pytorch
Commit Name: b2074ddf9d8bc2069d66976fea58a52f40238496
Time: 2017-11-16
Author: remi.cadene@icloud.com
File Name: pretrainedmodels/nasnet.py
Class Name: ReductionCell0
Method Name: __init__


Project Name: Cadene/pretrained-models.pytorch
Commit Name: b2074ddf9d8bc2069d66976fea58a52f40238496
Time: 2017-11-16
Author: remi.cadene@icloud.com
File Name: pretrainedmodels/nasnet.py
Class Name: CellStem0
Method Name: __init__


Project Name: Cadene/pretrained-models.pytorch
Commit Name: b2074ddf9d8bc2069d66976fea58a52f40238496
Time: 2017-11-16
Author: remi.cadene@icloud.com
File Name: pretrainedmodels/nasnet.py
Class Name: Cell1
Method Name: __init__


Project Name: Cadene/pretrained-models.pytorch
Commit Name: b2074ddf9d8bc2069d66976fea58a52f40238496
Time: 2017-11-16
Author: remi.cadene@icloud.com
File Name: pretrainedmodels/nasnet.py
Class Name: ReductionCell0
Method Name: __init__