1bfa3137cce6f41d160ceed23d098c26f26951ea,dataset/models/tf/resnet.py,ResNet,default_config,#Any#,62

Before Change


        config["input_block"].update(dict(layout="cnap", filters=64, kernel_size=7, strides=2,
                                          pool_size=3, pool_strides=2))

        config["body"]["block"] = dict(post_activation=None, downsample=False,
                                       bottleneck=False, bottleneck_factor=4,
                                       width_factor=1,
                                       resnext=False, resnext_factor=32,
                                       se_block=False, se_factor=16)

        config["head"].update(dict(layout="Vdf", dropout_rate=.4))

        config["loss"] = "ce"
        config["common"] = dict(conv=dict(use_bias=False))
        // The learning rate starts from 0.1 (no warming up), and is divided by 10 at 30 and 60 epochs
        // with batch size = 256 on ImageNet.
        init_lr = 1e-3 if is_best_practice() else .1
        config["decay"] = ("const", dict(boundaries=[117188, 234375], values=[init_lr, init_lr/10, init_lr/100]))
        config["optimizer"] = dict(name="Momentum", momentum=.9)
        return config

    def build_config(self, names=None):

After Change


    
    @classmethod
    def default_config(cls):
        config = TFModel.default_config()
        config["common/conv/use_bias"] = False
        config["input_block"].update(dict(layout="cnap", filters=64, kernel_size=7, strides=2,
                                          pool_size=3, pool_strides=2))

        config["body/block"] = dict(post_activation=None, downsample=False,
                                       bottleneck=False, bottleneck_factor=4,
                                       width_factor=1,
                                       resnext=False, resnext_factor=32,
                                       se_block=False, se_factor=16)

        config["head"] = dict(layout="Vdf", dropout_rate=.4)

        config["loss"] = "ce"
        if is_best_practice("optimizer"):
            config["optimizer"] = "Adam"
        else:
            // The learning rate starts from 0.1 (no warming up), and is divided by 10 at 30 and 60 epochs
            // with batch size = 256 on ImageNet.
            lr = .1
            config["decay"] = ("const", dict(boundaries=[117188, 234375], values=[lr, lr/10, lr/100]))
            config["optimizer"] = ("Momentum", dict(momentum=.9))
        return config

    def build_config(self, names=None):
        config = super().build_config(names)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 20

Instances


Project Name: analysiscenter/batchflow
Commit Name: 1bfa3137cce6f41d160ceed23d098c26f26951ea
Time: 2018-05-07
Author: rhudor@gmail.com
File Name: dataset/models/tf/resnet.py
Class Name: ResNet
Method Name: default_config


Project Name: analysiscenter/batchflow
Commit Name: 1bfa3137cce6f41d160ceed23d098c26f26951ea
Time: 2018-05-07
Author: rhudor@gmail.com
File Name: dataset/models/tf/densenet.py
Class Name: DenseNet
Method Name: default_config


Project Name: analysiscenter/batchflow
Commit Name: 1bfa3137cce6f41d160ceed23d098c26f26951ea
Time: 2018-05-07
Author: rhudor@gmail.com
File Name: dataset/models/tf/vnet.py
Class Name: VNet
Method Name: default_config


Project Name: analysiscenter/batchflow
Commit Name: 1bfa3137cce6f41d160ceed23d098c26f26951ea
Time: 2018-05-07
Author: rhudor@gmail.com
File Name: dataset/models/tf/resnet.py
Class Name: ResNet
Method Name: default_config