user7036306
user7036306

Reputation:

Working with TF Retrained Model

I'm trying to understand how to properly use a re-trained model that was generated using TensorFlow Retrain In Golang classifier.

I'm getting different results when I use the different models (extremely different and wrong results when using the Golang classifier)

After iterating the graph's operations I made some modifications to the Go app for it to work:

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)

and

const (
    H, W= 299, 299 // was 224,224
    Mean= float32(128) // was 117
    Scale= float32(1)
)

Am I loading the graph properly? is it wrong for the Mul operation to be first? perhaps the resizing

Upvotes: 1

Views: 72

Answers (1)

user7036306
user7036306

Reputation:

I think I found the issue. I've modified the sizes to correspond to the newly trained model. however the scaling remained as 1 instead of 128. now the results are reasonably well.

Upvotes: 1

Related Questions