8e3c612815cb03dfaf4f17f9ce79fcfe03088e30,allennlp/tests/nn/pretrained_model_initializer_test.py,TestPretrainedModelInitializer,_get_applicator,#TestPretrainedModelInitializer#Any#Any#Any#,45

Before Change


            }
        )
        params = Params({"initializer": [(regex, initializer_params)]})
        return InitializerApplicator.from_params(params["initializer"])

    def test_random_initialization(self):
        // The tests in the class rely on the fact that the parameters for
        // `self.net1` and `self.net2` are randomly initialized and not

After Change


        weights_file_path: str,
        parameter_name_overrides: Optional[Dict[str, str]] = None,
    ) -> InitializerApplicator:
        initializer = PretrainedModelInitializer(weights_file_path, parameter_name_overrides)
        return InitializerApplicator([(regex, initializer)])

    def test_random_initialization(self):
        // The tests in the class rely on the fact that the parameters for
        // `self.net1` and `self.net2` are randomly initialized and not
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: allenai/allennlp
Commit Name: 8e3c612815cb03dfaf4f17f9ce79fcfe03088e30
Time: 2020-02-06
Author: mattg@allenai.org
File Name: allennlp/tests/nn/pretrained_model_initializer_test.py
Class Name: TestPretrainedModelInitializer
Method Name: _get_applicator


Project Name: allenai/allennlp
Commit Name: e4442166561990a056de599cb1a2cde324504242
Time: 2018-03-28
Author: michael@schmitztech.com
File Name: allennlp/models/model.py
Class Name: Model
Method Name: load


Project Name: allenai/allennlp
Commit Name: f8b10a94d74d32f2ba0ff792f75a7335ab0c2651
Time: 2019-03-18
Author: brendanr@allenai.org
File Name: allennlp/training/trainer_base.py
Class Name: TrainerBase
Method Name: from_params