4e9802ed633e4d682fbf95e424c4f0bce0802c7f,allennlp/nn/initializers.py,InitializerApplicator,from_params,#Any#Any#,130

Before Change


        -------
        An InitializerApplicator containing the specified initializers.
        
        all_initializer_params = params.pop("initializers", {})
        initializers = {}
        for name, initializer_params in all_initializer_params.items():
            initializers[name] = Initializer.from_params(initializer_params)
        default = initializers.pop("default", Initializer.by_name("normal")())
        exclude_regexes = params.pop("exclude", [])
        return InitializerApplicator(initializers, default, exclude_regexes)

After Change


        
        exclude_regexes = params.pop("exclude", [])
        initializers = {}
        for name in list(params.keys()):
            initializer_params = params.pop(name)
            if name[0] == """ and name[-1] == """:
                name = name[1:-1]
            initializers[name] = Initializer.from_params(initializer_params)
        default = initializers.pop("default", Initializer.by_name("normal")())
        params.assert_empty(cls.__name__)
        return InitializerApplicator(initializers, default, exclude_regexes)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: allenai/allennlp
Commit Name: 4e9802ed633e4d682fbf95e424c4f0bce0802c7f
Time: 2017-08-16
Author: mattg@allenai.org
File Name: allennlp/nn/initializers.py
Class Name: InitializerApplicator
Method Name: from_params


Project Name: PetrochukM/PyTorch-NLP
Commit Name: 2a1a6851344172e0134f3c5f4f5c1021975f2812
Time: 2018-03-11
Author: petrochukm@gmail.com
File Name: torchnlp/samplers/bucket_batch_sampler.py
Class Name: BucketBatchSampler
Method Name: __iter__


Project Name: has2k1/plotnine
Commit Name: a7024416e4ff05722bc2bcee0c2771933899dfe3
Time: 2014-03-30
Author: has2k1@gmail.com
File Name: ggplot/geoms/geom_area.py
Class Name: geom_area
Method Name: plot_layer