Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

Training custom TensorFlow networks for JeVois

0 votes
I was able to retrain the model, but when it comes to the section below on inference toco complains that you can't use the same output format as the input format. If I skip this step and load into the camera I get the catch statement error message on the screen. Is there another way to optimize the model? Thanks.

# Optimize the model for inference:
toco \
  --input_file=tf_files/retrained_graph.pb \
  --output_file=tf_files/optimized_graph.pb \
  --input_format=TENSORFLOW_GRAPHDEF \
  --output_format=TENSORFLOW_GRAPHDEF \
  --input_shape=1,${IMAGE_SIZE},${IMAGE_SIZE},3 \
  --input_array=input \
  --output_array=final_result
asked Oct 9, 2018 in Programmer Questions by elarson83 (120 points)

1 Answer

0 votes
Probably something changed in TensorFlow (that tutorial was written with TensorFlow 1.7, but now we run 1.9 in JeVois).

Can you check out the steps there:

https://codelabs.developers.google.com/codelabs/tensorflow-for-poets-2-tflite/index.html#2

in particular step 3, looks like they combined the two toco commands they originally had into just one now.

We will try it and update our tutorial in the next few days.
answered Oct 11, 2018 by JeVois (46,580 points)
Hi,
I was able to get things to work. I think the key for me was your mentioning the Tensorflow versions. I was using the latest version (1.11?) which had much different arguments for toco function. Plus, there is no real feedback from the script other than "error". Everything else I've been doing is in a windows environment up to the toco which required me to run a Virtualbox with Ubantu. Not much of a Linux person so there was a little bit of a learning curve. Supposedly toco is going to be converted as some point in the future for windows support.  

Thanks. And I hope this helps someone else who might be struggling :)
great, thanks as indeed this is very useful to know! Traveling now but doc update will follow shortly.
...