2cacee3efdf68a041330d2059c7cdb41dcc7df72,calamari_ocr/ocr/backends/tensorflow_backend/tensorflow_model.py,TensorflowModel,load,#Any#Any#,18

Before Change


            // TODO: Crash if cudnn is loaded
            // Workaround create new graph and load weights
            print(e)
            print("Attempting a workaround")

            model = TensorflowModel.from_proto(network_proto)
            with model.graph.as_default() as g:
                saver = tf.train.Saver()

After Change


                    saver.restore(model.session, restore)
                except tf.errors.NotFoundError as e:
                    print("Attempting workaround: only loading trainable variables")
                    saver = tf.train.Saver(tf.trainable_variables())
                    saver.restore(model.session, restore)

            return model
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Calamari-OCR/calamari
Commit Name: 2cacee3efdf68a041330d2059c7cdb41dcc7df72
Time: 2018-05-07
Author: wick.chr.info@gmail.com
File Name: calamari_ocr/ocr/backends/tensorflow_backend/tensorflow_model.py
Class Name: TensorflowModel
Method Name: load


Project Name: deepmipt/DeepPavlov
Commit Name: 0ddd27b71f54be5682da90473d00ea671a3459ca
Time: 2018-01-29
Author: arkhipov@yahoo.com
File Name: deeppavlov/core/models/tf_model.py
Class Name: TFModel
Method Name: save


Project Name: deepmipt/DeepPavlov
Commit Name: 6b33ca24d5df63dcae69f4e6140327f5fecbc897
Time: 2018-01-26
Author: ol.gure@gmail.com
File Name: deeppavlov/core/models/tf_model.py
Class Name: TFModel
Method Name: save