hub icon indicating copy to clipboard operation
hub copied to clipboard

Modifications in evaluate.py for other architectures (KeyError: "The name 'final_training_ops/Wx_plus_b/add:0' refers to a Tensor which does not exist.)

Open sumanth-culli opened this issue 8 years ago • 1 comments

There's a script for measuring the model's performance at tensorflow-for-poets-2/scripts/evaluate.py. That script was originally written for mobilenet models but can be modified for other architectures accordingly. What should I write in line 41 logits = graph.get_tensor_by_name("final_training_ops/Wx_plus_b/add:0"). I'm getting KeyError: "The name 'final_training_ops/Wx_plus_b/add:0' refers to a Tensor which does not exist. The operation, 'final_training_ops/Wx_plus_b/add', does not exist in the graph."

sumanth-culli avatar Jun 14 '18 11:06 sumanth-culli

I figured this out myself. Given a .pb file, we can view the operations in frozen .pb TensorFlow graphs using this code. So, we need to replace the line 41 with the last operation according to our .pb file.

sumanth-culli avatar Jun 26 '18 11:06 sumanth-culli