e3fe7fca004b2fd3eab4e69cfa91c032863b8031,pytorch/models/nasnet.py,FirstCell,__init__,#FirstCell#Any#Any#Any#Any#,346

Before Change


        super(FirstCell, self).__init__()
        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.relu = nn.ReLU()
        self.path_1 = nn.Sequential()
        self.path_1.add_module("avgpool", nn.AvgPool2d(1, stride=2, count_include_pad=False))
        self.path_1.add_module("conv", nn.Conv2d(in_channels_left, out_channels_left, 1, stride=1, bias=False))
        self.path_2 = nn.ModuleList()
        self.path_2.add_module("pad", nn.ZeroPad2d((0, 1, 0, 1)))
        self.path_2.add_module("avgpool", nn.AvgPool2d(1, stride=2, count_include_pad=False))
        self.path_2.add_module("conv", nn.Conv2d(in_channels_left, out_channels_left, 1, stride=1, bias=False))

        self.final_path_bn = nn.BatchNorm2d(out_channels_left * 2, eps=0.001, momentum=0.1, affine=True)

        self.comb_iter_0_left = BranchSeparables(out_channels_right, out_channels_right, 5, 1, 2, bias=False)
        self.comb_iter_0_right = BranchSeparables(out_channels_right, out_channels_right, 3, 1, 1, bias=False)

        self.comb_iter_1_left = BranchSeparables(out_channels_right, out_channels_right, 5, 1, 2, bias=False)
        self.comb_iter_1_right = BranchSeparables(out_channels_right, out_channels_right, 3, 1, 1, bias=False)

        self.comb_iter_2_left = nn.AvgPool2d(3, stride=1, padding=1, count_include_pad=False)

        self.comb_iter_3_left = nn.AvgPool2d(3, stride=1, padding=1, count_include_pad=False)
        self.comb_iter_3_right = nn.AvgPool2d(3, stride=1, padding=1, count_include_pad=False)

        self.comb_iter_4_left = BranchSeparables(out_channels_right, out_channels_right, 3, 1, 1, bias=False)

    def forward(self, x, x_prev):

After Change


        self.relu = nn.ReLU()
        self.path_1 = nn.Sequential()
        self.path_1.add_module("avgpool", nasnet_avgpool1x1_s2())
        self.path_1.add_module("conv", conv1x1(
            in_channels=in_channels_left,
            out_channels=out_channels_left))
        self.path_2 = nn.ModuleList()
        self.path_2.add_module("pad", nn.ZeroPad2d((0, 1, 0, 1)))
        self.path_2.add_module("avgpool", nasnet_avgpool1x1_s2())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 15

Instances


Project Name: osmr/imgclsmob
Commit Name: e3fe7fca004b2fd3eab4e69cfa91c032863b8031
Time: 2018-08-20
Author: osemery@gmail.com
File Name: pytorch/models/nasnet.py
Class Name: FirstCell
Method Name: __init__


Project Name: osmr/imgclsmob
Commit Name: e3fe7fca004b2fd3eab4e69cfa91c032863b8031
Time: 2018-08-20
Author: osemery@gmail.com
File Name: pytorch/models/nasnet.py
Class Name: FirstCell
Method Name: __init__


Project Name: osmr/imgclsmob
Commit Name: e3fe7fca004b2fd3eab4e69cfa91c032863b8031
Time: 2018-08-20
Author: osemery@gmail.com
File Name: pytorch/models/nasnet.py
Class Name: CellStem1
Method Name: __init__


Project Name: osmr/imgclsmob
Commit Name: e3fe7fca004b2fd3eab4e69cfa91c032863b8031
Time: 2018-08-20
Author: osemery@gmail.com
File Name: pytorch/models/nasnet.py
Class Name: NormalCell
Method Name: __init__