title: tf.Tensor 'import/Mul:0' shape=(1, 299, 299, 3) dtype=float32> as input?
body: <p>After reading an image file and normalizing it, I was wondering which node would serve as the input within inception.</p>
  <p>I normalized the image using this function (from tensorflow respository)</p>
  <pre><code>def read_tensor_from_image_file(file_name, input_height=299, input_width=299,
                  input_mean=0, input_std=255):
    input_name = &quot;file_reader&quot;
    output_name = &quot;normalized&quot;
    file_reader = tf.read_file(file_name, input_name)
    if file_name.endswith(&quot;.png&quot;):
      image_reader = tf.image.decode_png(file_reader, channels = 3,
                                         name='png_reader')
    elif file_name.endswith(&quot;.gif&quot;):
      image_reader = tf.squeeze(tf.image.decode_gif(file_reader,
                                                    name='gif_reader'))
    elif file_name.endswith(&quot;.bmp&quot;):
      image_reader = tf.image.decode_bmp(file_reader, name='bmp_reader')
    else:
      image_reader = tf.image.decode_jpeg(file_reader, channels = 3,
                                          name='jpeg_reader')
    float_caster = tf.cast(image_reader, tf.float32)
    dims_expander = tf.expand_dims(float_caster, 0);
    resized = tf.image.resize_bilinear(dims_expander, [input_height, input_width])
    normalized = tf.divide(tf.subtract(resized, [input_mean]), [input_std])
    sess = tf.Session()
    result = sess.run(normalized)
  
    return result
  </code></pre>
  <p>Looking at the inception operations:</p>
  <pre><code>&lt;bound method Operation.values of &lt;tf.Operation 'import/DecodeJpeg/contents' type=Const&gt;&gt; 
  
  &lt;bound method Operation.values of &lt;tf.Operation 'import/DecodeJpeg' type=DecodeJpeg&gt;&gt; 
  
  &lt;bound method Operation.values of &lt;tf.Operation 'import/Cast' type=Cast&gt;&gt; 
  
  &lt;bound method Operation.values of &lt;tf.Operation 'import/ExpandDims/dim' type=Const&gt;&gt; 
  
  &lt;bound method Operation.values of &lt;tf.Operation 'import/ExpandDims' type=ExpandDims&gt;&gt; 
  
  &lt;bound method Operation.values of &lt;tf.Operation 'import/ResizeBilinear/size' type=Const&gt;&gt; 
  
  &lt;bound method Operation.values of &lt;tf.Operation 'import/ResizeBilinear' type=ResizeBilinear&gt;&gt; 
  
  &lt;bound method Operation.values of &lt;tf.Operation 'import/Sub/y' type=Const&gt;&gt; 
  
  &lt;bound method Operation.values of &lt;tf.Operation 'import/Sub' type=Sub&gt;&gt; 
  
  &lt;bound method Operation.values of &lt;tf.Operation 'import/Mul/y' type=Const&gt;&gt; 
  
  &lt;bound method Operation.values of &lt;tf.Operation 'import/Mul' type=Mul&gt;&gt; 
  
  &lt;bound method Operation.values of &lt;tf.Operation 'import/conv/conv2d_params' type=Const&gt;&gt; 
  </code></pre>
  <p>It seems the first few layers do normalizations of a jpeg file which I can skip due to the function provided above.</p>
  <p>Now I'm not sure where I can input <code>result</code> (result of the above function):</p>
  <p>I'm not exactly sure what <code>Mul</code> (multiply) is doing in this case but I'm assuming the result of that node's operation should be the same as the result of my function above? My assumption is based on the subsequent layer -- which is a conv layer revolving around parameters( weights?)</p>
  <p>So I was wondering if I can use that as the input, for inference.</p>
  <p>Thank you.</p>
  <p>EDIT: These are the scripts from tf repository I'm using:</p>
  <h3>Retraining</h3>
  <p><a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.py" rel="nofollow noreferrer">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.py</a></p>
  <h3>Inference</h3>
  <p><a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/label_image/label_image.py" rel="nofollow noreferrer">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/label_image/label_image.py</a></p>