List of tensor names in graph in Tensorflow

后端 未结 6 1133
死守一世寂寞
死守一世寂寞 2020-11-28 21:04

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

6条回答
  •  暖寄归人
    2020-11-28 21:12

    To see the operations in the graph (You will see many, so to cut short I have given here only the first string).

    sess = tf.Session()
    op = sess.graph.get_operations()
    [m.values() for m in op][1]
    
    out:
    (,)
    

提交回复
热议问题