114b82a212ed2b2590d45550c41c3384ffa0d53e,keras/backend/tensorflow_backend.py,,get_session,#,60

Before Change


        return tf.get_default_session()
    if _SESSION is None:
        if not os.environ.get("OMP_NUM_THREADS"):
            _SESSION = tf.Session(config=tf.ConfigProto(allow_soft_placement=True))
        else:
            nb_thread = int(os.environ.get("OMP_NUM_THREADS"))
            _SESSION = tf.Session(config=tf.ConfigProto(intra_op_parallelism_threads=nb_thread,

After Change


    else:
        if _SESSION is None:
            if not os.environ.get("OMP_NUM_THREADS"):
                config = tf.ConfigProto(allow_soft_placement=True)
            else:
                nb_thread = int(os.environ.get("OMP_NUM_THREADS"))
                config = tf.ConfigProto(intra_op_parallelism_threads=nb_thread,
                                        allow_soft_placement=True)
            _SESSION = tf.Session(config=config)
        session = _SESSION
    if not _MANUAL_VAR_INIT:
        _initialize_variables()
    return session
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 114b82a212ed2b2590d45550c41c3384ffa0d53e
Time: 2016-11-01
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: get_session


Project Name: tensorflow/tpu
Commit Name: 080700865e68f22295b296e097032baa89231d99
Time: 2018-04-13
Author: huangyp@google.com
File Name: models/official/retinanet/retinanet_main.py
Class Name:
Method Name: main


Project Name: NervanaSystems/nlp-architect
Commit Name: b62abc1c97b35bfcfd03d9dc7a5171a9c60bd375
Time: 2018-05-07
Author: snitturs@Ubuntu-Server14044-x8664.local.lan
File Name: core_models/reading_comprehension/tensorflow_implementation/train.py
Class Name:
Method Name: