57591a23e73d3b2ca8132589e68c8a480f1686f5,baseline/tf/lm/model.py,LanguageModelBase,load,#Any#Any#,225

Before Change


            embeddings = {}
            embeddings_dict = _state.pop("embeddings")

            for key, class_name in embeddings_dict.items():
                md = read_json("{}-{}-md.json".format(basename, key))
                embed_args = dict({"vsz": md["vsz"], "dsz": md["dsz"]})
                Constructor = eval(class_name)
                embeddings[key] = Constructor(key, **embed_args)

            model = cls.create(embeddings, **_state)
            model._state = _state

            do_init = kwargs.get("init", True)

After Change


            _state["sess"] = kwargs.pop("sess", create_session())
            embeddings_info = _state.pop("embeddings")

            with _state["sess"].graph.as_default():
                embeddings = reload_embeddings(embeddings_info, basename)
                for k in embeddings_info:
                    if k in kwargs:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: dpressel/mead-baseline
Commit Name: 57591a23e73d3b2ca8132589e68c8a480f1686f5
Time: 2020-04-28
Author: dpressel@gmail.com
File Name: baseline/tf/lm/model.py
Class Name: LanguageModelBase
Method Name: load


Project Name: cryoem/eman2
Commit Name: d66a11a0a845a6ea0dfeaec56a3644116ef6c305
Time: 2021-03-04
Author: g5v991x@gmail.com
File Name: programs/e2spa_align.py
Class Name: SpaAlignTask
Method Name: execute


Project Name: keras-team/keras
Commit Name: 48e056d31fa3be6b53b46aac46e39c576fc4e89c
Time: 2017-04-02
Author: francois.chollet@gmail.com
File Name: keras/layers/wrappers.py
Class Name: Bidirectional
Method Name: call