4d857be62bbeabf1ba6374492d13d63a097891ed,keras/backend/tensorflow_backend.py,,eval,#Any#,536

Before Change


    {{np_implementation}}
    
    // TODO
    return to_dense(x).eval(session=get_session())


@tf_graph_op
def zeros(shape, dtype=None, name=None):

After Change


    if hasattr(x, "numpy"):
        return x.numpy()
    eval_fn = function([], [x])
    return eval_fn([])[0]


def zeros(shape, dtype=None, name=None):
    Instantiates an all-zeros variable and returns it.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 4d857be62bbeabf1ba6374492d13d63a097891ed
Time: 2019-03-05
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: eval


Project Name: NervanaSystems/nlp-architect
Commit Name: bf6adcde668eefc374338ad639765f0de44e38e6
Time: 2018-07-08
Author: amit.yaccobi@intel.com
File Name: nlp_architect/models/np_semantic_segmentation.py
Class Name: NpSemanticSegClassifier
Method Name: eval


Project Name: keras-team/keras
Commit Name: bbba9cede7cf9603598a78b6b27d87599dff8312
Time: 2019-03-04
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: get_value