title: how to get the shape of the input in each node in tensorflow graph?
body: <p>Hi: Now I am working on converting a tensorflow checkpoint model into a caffe model. I have succeded in reading the graph and have extracted the attr values in each node. I got the values of 'dilations', 'strides' and 'padding' attr in "Conv2D" node and the shapes in "weights" node, but I couldn't get the value of 'shape' attr, it's empty in Conv2D's input node. However, these shapes are shown in tensorboard's graphs.
  here is my code:</p>
  
  <pre><code>new_saver = tf.train.import_meta_graph(meta_path)          
  new_saver.restore(sess, tf.train.latest_checkpoint(ckpt_path))
  graph_def = sess.graph_def
  node_list = graph_def.node
  
  # conv_node, weight_node, from_node are all in node_list
  # conv_node: the conv2d node in graph_def
  # weight_node: the weights node of conv2d
  # from_node: the input feature map node of conv2d
  
  weight_shape_attr = weight_node.attr['shape']
  weight_shapes = [dim.size for dim in weight_shape_attr.shape.dim]
  
  strides = [ii for ii in conv_node.attr['strides'].list.i]
  dilations = [ii for ii in conv_node.attr['dilations'].list.i]
  
  shapes = from_node.attr['shape']  # this is empty
  </code></pre>
  
  <p>and the tensorboard graph:
  <a href="https://i.stack.imgur.com/koMV6.png" rel="nofollow noreferrer">tensorboard_graph</a></p>
  
  <p>Note that the input of the Conv2D node has the shape of ?x79x79x32, it must have been stored somewhere in the model file.  Can any one give some help？ any hits will be helpful, thanks.</p>