【发布时间】:2016-05-28 19:20:18
【问题描述】:
更具体地说,我想在 'classify_image_graph_def.pb' 内部的图表中查看执行的操作,该图表位于 Tensorflow 的 imagenet Inception 模型中。
【问题讨论】:
-
我已经做到了这一点:[x for x in sess.graph.get_operations() if x.type =='Conv2D'] 这给了我 94 个条目,例如 'import/mixed_5/tower_1/ conv_1/Conv2D'。然后我可以使用该字符串并执行以下操作: t=sess.graph.get_tensor_by_name('import/mixed_5/tower_1/conv_1/Conv2D:0');foo=sess.run(t) figure();[(subplot(ceil( sqrt(foo.shape[-1])),ceil(sqrt(foo.shape[-1])),i+1), imshow(foo[0,:,:,i])) for i in range( foo.shape[-1])] 这给了我看起来像卷积核的图像,但这与制作这样图片的工具相去甚远:cs231n.github.io/assets/cnn/weights.jpeg
标签: python-2.7 tensorflow