be119b0bb043be437f9619c26cf0f9878a6a9090,GPflow/misc.py,,get_tensor_by_name,#Any#Any#Any#,38

Before Change


    graph = _get_graph(graph)
    try:
        if index is not None:
            return graph.get_tensor_by_name(":".join([name, index]))
        return graph.get_tensor_by_name(name)
    except ValueError:
        return None

After Change


    if index is not None:
        return _get_tensor_by_name(name, index, graph)
    tensor = _get_tensor_by_name(name, "0", graph)
    if tensor is None:
        return tensor
    if _get_tensor_by_name(name, "1", graph) is not None:
        raise ValueError("Ambiguous tensor for "{0}" with multiple indices found."
                         .format(name))
    return tensor


def is_ndarray(value):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: GPflow/GPflow
Commit Name: be119b0bb043be437f9619c26cf0f9878a6a9090
Time: 2017-09-14
Author: art.art.v@gmail.com
File Name: GPflow/misc.py
Class Name:
Method Name: get_tensor_by_name


Project Name: google/deepvariant
Commit Name: e1aca5875121ef15bdb07243af56eb704d79c794
Time: 2019-12-05
Author: pichuan@google.com
File Name: deepvariant/model_train.py
Class Name:
Method Name: run


Project Name: keras-team/keras
Commit Name: e74a37438b5389ae19eb61b431859f9789100874
Time: 2017-05-22
Author: ajoseph.lobo@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: function