b56a4b355dfc302fa449d223e065af3a7acac986,snorkel/learning/pytorch/noise_aware_model.py,TorchNoiseAwareModel,load,#TorchNoiseAwareModel#,252

Before Change



        // Initialize variables
        with self.graph.as_default():
            self.session.run(tf.global_variables_initializer())

        // Load saved checkpoint to populate trained parameters
        with self.graph.as_default():
            saver = tf.train.Saver(tf.global_variables())

After Change


        warnings.warn("Unstable! Please extensively test this part of the code when time permits")
        
        self.load_state_dict(
            torch.load("{}/model.params".format(model_dir))
        )
        if verbose:
            print("[{0}] Loaded model <{1}>".format(self.name, model_name))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: snorkel-team/snorkel
Commit Name: b56a4b355dfc302fa449d223e065af3a7acac986
Time: 2018-05-03
Author: dnicholson329@gmail.com
File Name: snorkel/learning/pytorch/noise_aware_model.py
Class Name: TorchNoiseAwareModel
Method Name: load


Project Name: yahoo/TensorFlowOnSpark
Commit Name: 981e4266d4ea816b08a762193bd52f40cd1a3242
Time: 2019-08-07
Author: leewyang@verizonmedia.com
File Name: examples/mnist/keras/mnist_inference.py
Class Name:
Method Name: inference


Project Name: jazzband/django-debug-toolbar
Commit Name: a8413f6f4129b53d8cf60d55468ac4b2545ed46d
Time: 2018-11-26
Author: thomas@deepomatic.com
File Name: debug_toolbar/panels/sql/utils.py
Class Name:
Method Name: reformat_sql