In Tensorflow, get the names of all the Tensors in a graph

前端 未结 10 684
独厮守ぢ
独厮守ぢ 2020-11-27 10:29

I am creating neural nets with Tensorflow and skflow; for some reason I want to get the values of some inner tensors for a given input, so I am usi

10条回答
  •  再見小時候
    2020-11-27 10:45

    You can do

    [n.name for n in tf.get_default_graph().as_graph_def().node]
    

    Also, if you are prototyping in an IPython notebook, you can show the graph directly in notebook, see show_graph function in Alexander's Deep Dream notebook

提交回复
热议问题