7a9ab625ca95a5951a7cac572d8e4aa36a3afbba,deeppavlov/models/ner/ner_network.py,NerNetwork,load,#NerNetwork#,189

Before Change



    def load(self):
        saver = tf.train.Saver()
        saver.restore(self._sess, str(self.ser_path))

    def tokens_batch_to_numpy_batch(self, batch_x, batch_y=None):
        // Determine dimensions
        batch_size = len(batch_x)

After 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")
        else:
            print("\n:: <ERR> checkpoint not found! \n")

    def tokens_batch_to_numpy_batch(self, batch_x, batch_y=None):
        // Determine dimensions
        batch_size = len(batch_x)
        max_utt_len = max([len(utt) for utt in batch_x])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: 7a9ab625ca95a5951a7cac572d8e4aa36a3afbba
Time: 2018-01-24
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: c04aefe07dad54610c49e7841410c85876896b34
Time: 2018-01-24
Author: yoptar@gmail.com
File Name: deeppavlov/models/ner/ner_network.py
Class Name: NerNetwork
Method Name: load


Project Name: deepmipt/DeepPavlov
Commit Name: 1a681c78295546dbec25a05c5ff5617e20ddac1d
Time: 2018-01-24
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: 7a9ab625ca95a5951a7cac572d8e4aa36a3afbba
Time: 2018-01-24
Author: ol.gure@gmail.com
File Name: deeppavlov/models/ner/ner_network.py
Class Name: NerNetwork
Method Name: load