Exporting to serve from slim/inception_v3 complains of missing tensorName
Hi, first off, thanks for all the hard work everyone, I really enjoy tensorflow and have been quite happy with how it's now become from a year ago. It's quite an accomplishment!
Issue: I was previously able to serve my weights from the tensorflow/inception model tutorial. However, recently I decided to experiment with the slim/inception_v3 model which I believe is a slightly different implementation of inception_v3? and when I try to export weights using the flower tutorial, I'm getting a complaint of a missing tensor.
NotFoundError (see above for traceback): Tensor name "mixed_17x17x768d/branch7x7/Conv_2/weights/ExponentialMovingAverage" not found in checkpoint files /tmp/flowers-models/inception_v3/model.ckpt-1000 [[Node: save/RestoreV2_167 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_167/tensor_names, save/RestoreV2_167/shape_and_slices)]]
Previously working tutorial to train and have been able to successfully serve: https://github.com/tensorflow/models/tree/master/inception
Slim tutorial which is the direction I think tensorflow is moving to add new models and I'm trying to adapt and serve weights moving forward. Testing inception_v3 flowers tutorial here to export which isn't working: https://github.com/tensorflow/models/tree/master/slim
The inception code in tensorflow/inception is indeed different from the one in tensorflow slim (and will be sunset at some point. Are you re-training the model? If not, you can use an existing pre-trained checkpoint for the tensorflow slim version of inception here:
Code: https://github.com/tensorflow/models/blob/master/slim/nets/inception_v3.py
Checkpoint: http://download.tensorflow.org/models/inception_v3_2016_08_28.tar.gz
Hi Nathan, thanks for responding so quickly.
Yes, I've retrained the model already starting from the checkpoint which is also the one in your link. I used the script provided here by you guys.
https://github.com/tensorflow/models/blob/master/slim/scripts/finetune_inception_v3_on_flowers.sh
It downloads the flowers data, downloads the checkpoint (the one you linked to), trains 1000 steps, evaluates, trains another 500, evaluates and saves the check-point which is what I'm trying to export and running into the issue above.
The main inception model export worked just fine, so not sure what's happening here hence my guess of different architecture. Funny thing is, the other inception also has a flowers demo and utilizes a different checkpoint to fine-tune from and works while exporting : It's dated 3-01.
http://download.tensorflow.org/models/image/imagenet/inception-v3-2016-03-01.tar.gz
Any other hints? Does the tensorflow serving work if I were to just export the 8/28 model without training? I'd eventually want to export training on my own dataset though.
Hi Nathan, Just wondering if you can point me in the right direction. I'm happy to do all the leg work.
I'm also retraining inception-v3 and very much want to be able to serve it via this project. I'm guessing many others out there would too (it is a great model, and resource hungry enough to make serving it a challenge). Please help.
I'm currently working on this. Looks like we just need to restore the model using the new definition in Slim. We can use tf_models/slim/eval_image_classifier.py as an example of how to do this.
Please update this issue if and when you manage. I would love this code. Currently I'm too busy with other things to help and it will be a month or two before that changes, but I so want to be able to do this. It completes the cycle for me (and many others). Currently I'm making a very ugly and less scalable jsonrpc service to serve my retrained networks. Which is just not to the enterprise standard I was hoping for when I chose TF. I'll keep watching...
Can anyone help us on this?
@jlertle Any luck?
Waiting on approval from my employer. It was fairly straightforward though. The hardest part was figuring out Bazel.
Looking forward to this! Hope they are happy to share
Phil Teare evolu8 Ltd whichisit.io
On Tue, Nov 29, 2016 at 3:07 AM, Jason Lee Ertle [email protected] wrote:
Waiting on approval from my employer. It was fairly straightforward though. The hardest part was figuring out Bazel.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tensorflow/serving/issues/224#issuecomment-263463949, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvlRXZTZQ2JySDuq57wZOEEj-wE3x5-ks5rC5bfgaJpZM4KhxEz .
I'd be excited to see that, too!
Has anyone solved this?
Closing due to staleness.