76125cafc9734441b4dab036e345fbb0abf1d84a,deeppavlov/models/ner/ner_network.py,NerNetwork,load,#NerNetwork#,197

Before Change


        Load session from checkpoint
        
        saver = tf.train.Saver()
        ckpt = self.get_checkpoint_state()
        if ckpt and ckpt.model_checkpoint_path:
            print("\n:: restoring checkpoint from", ckpt.model_checkpoint_path, "\n")
            saver.restore(self._sess, ckpt.model_checkpoint_path)
            print("session restored")

After Change


    def load(self):
        if self.load_path:
            if isinstance(self.load_path, Path) and self.load_path.parent.is_dir():
                if tf.train.get_checkpoint_state(self.load_path.parent) is not None:
                    saver = tf.train.Saver()
                    print("Restore NerNetwork model from {}".format(str(self.load_path)))
                    saver.restore(self._sess, str(self.load_path))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: 76125cafc9734441b4dab036e345fbb0abf1d84a
Time: 2018-01-26
Author: ol.gure@gmail.com
File Name: deeppavlov/models/ner/ner_network.py
Class Name: NerNetwork
Method Name: load


Project Name: deepmipt/DeepPavlov
Commit Name: 8125b970cd39392aaa74f9dfc1e51bb4ed2106ea
Time: 2017-12-15
Author: mary.vikhreva@gmail.com
File Name: deeppavlov/core/models/tf_model.py
Class Name: TFModel
Method Name: load


Project Name: deepmipt/DeepPavlov
Commit Name: 0711c6e6bf8143ea6c9e8e5e138ccf2f5e9af25c
Time: 2017-12-20
Author: mary.vikhreva@gmail.com
File Name: deeppavlov/core/models/tf_model.py
Class Name: TFModel
Method Name: load