title: Working with TF Retrained Model
body: <p>I'm trying to understand how to properly use a re-trained model that was generated using <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.py" rel="nofollow noreferrer">TensorFlow Retrain</a>
  In <a href="https://outcrawl.com/image-recognition-api-go-tensorflow/" rel="nofollow noreferrer">Golang classifier</a>.</p>
  
  <p>I'm getting different results when I use the different models (extremely different and <strong>wrong results</strong> when using the Golang classifier)</p>
  
  <p>After iterating the graph's operations I made some modifications to the Go app for it to work:</p>
  
  <pre><code>session.Run(
  map[tf.Output]*tf.Tensor{
      graph.Operation("Mul").Output(0): tensor, // was "input"
  },
  []tf.Output{
      graph.Operation("final_result").Output(0), // was "output"
  },
  nil)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>const (
      H, W= 299, 299 // was 224,224
      Mean= float32(128) // was 117
      Scale= float32(1)
  )
  </code></pre>
  
  <p>Am I loading the graph properly? is it wrong for the Mul operation to be first?
  perhaps the resizing</p>