The graph object in Tensorflow has a method called \"get_tensor_by_name(name)\". Is there anyway to get a list of valid tensor names?
If not, does anyone know the va
As a nested list comprehension:
tensor_names = [t.name for op in tf.get_default_graph().get_operations() for t in op.values()]
Function to get names of Tensors in a graph (defaults to default graph):
def get_names(graph=tf.get_default_graph()):
return [t.name for op in graph.get_operations() for t in op.values()]
Function to get Tensors in a graph (defaults to default graph):
def get_tensors(graph=tf.get_default_graph()):
return [t for op in graph.get_operations() for t in op.values()]