29eac269527a4466dfef282374aed49ce66d9bfb,chainer_/models/nasnet.py,NASNet,__init__,#NASNet#Any#Any#Any#Any#Any#,991

Before Change


                self.features.add(stage)

            self.features.add(nn.Activation("relu"))
            self.features.add(nn.AvgPool2D(
                pool_size=7,
                strides=1))

            self.output = nn.HybridSequential(prefix="")
            self.output.add(nn.Flatten())
            self.output.add(nn.Dropout(rate=0.5))
            self.output.add(nn.Dense(
                units=classes,
                in_units=in_channels))

After Change


                    stride=1))

            self.output = SimpleSequential()
            with self.output.init_scope():
                setattr(self.output, "flatten", partial(
                    F.reshape,
                    shape=(-1, in_channels)))
                setattr(self.output, "dropout", partial(
                    F.dropout,
                    ratio=0.5))
                setattr(self.output, "fc", L.Linear(
                    in_size=in_channels,
                    out_size=classes))


    def __call__(self, x):
        x = self.features(x)
        x = self.output(x)
        return x
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: osmr/imgclsmob
Commit Name: 29eac269527a4466dfef282374aed49ce66d9bfb
Time: 2018-09-06
Author: osemery@gmail.com
File Name: chainer_/models/nasnet.py
Class Name: NASNet
Method Name: __init__


Project Name: osmr/imgclsmob
Commit Name: 29eac269527a4466dfef282374aed49ce66d9bfb
Time: 2018-09-06
Author: osemery@gmail.com
File Name: chainer_/models/nasnet.py
Class Name: NASNet
Method Name: __init__


Project Name: osmr/imgclsmob
Commit Name: 553f777ad245ef3caa799151e34e6cc37bbcb11a
Time: 2020-02-18
Author: osemery@gmail.com
File Name: gluon/gluoncv2/models/mobilenetv2.py
Class Name: MobileNetV2
Method Name: __init__


Project Name: osmr/imgclsmob
Commit Name: 056338255ea968d28ab462295b308cf475adcdde
Time: 2018-09-05
Author: osemery@gmail.com
File Name: chainer_/models/dpn.py
Class Name: DPN
Method Name: __init__