title: How do i get the input_shape of a frozen Tensorflow-Model for TOCO tf_convert
body: <p>I'm trying to convert a frozen model i got from <a href="https://github.com/davidsandberg/facenet" rel="nofollow noreferrer">davidsandberg/facenet</a> to .tflite on Ubuntu 18.04.1 LTS (VirtualBox) using the <a href="https://www.tensorflow.org/lite/convert/" rel="nofollow noreferrer">TF Lite Converter</a> <a href="https://drive.google.com/file/d/1EXPBSXwTaqrSC0OhUdXNmKSh9qJUQ55-/view" rel="nofollow noreferrer">(this is the specific model i am using)</a>.
  When i try to run the command:</p>
  
  <pre><code>/home/nils/.local/bin/tflite_convert 
  --output_file=/home/nils/Documents/frozen.tflite 
  --graph_def_file=/home/nils/Documents/20180402-114759/20180402-114759.pb 
  --input_arrays=input --output_array=embeddings
  </code></pre>
  
  <p>i get the following error:</p>
  
  <pre><code>2018-11-29 16:36:21.774098: I 
  tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports 
  instructions that this TensorFlow binary was not compiled to use: AVX2
  Traceback (most recent call last):
  File "/home/nils/.local/bin/tflite_convert", line 11, in &lt;module&gt;
   sys.exit(main())
  File 
  "/home/nils/.local/lib/python3.6/site-packages/tensorflow/contrib   /lite/python/tflite_convert.py", 
  line 412, in main
   app.run(main=run_main, argv=sys.argv[:1])
     File 
  "/home/nils/.local/lib/python3.6/site-packages/tensorflow/python/platform/app.py", 
  line 125, in run
   _sys.exit(main(argv))
  File 
  "/home/nils/.local/lib/python3.6/site-packages/tensorflow/contrib/lite/python/tflite_convert.py", 
  line 408, in run_main
   _convert_model(tflite_flags)
  File 
  "/home/nils/.local/lib/python3.6/site-packages/tensorflow/contrib/lite/python/tflite_convert.py", 
  line 162, in _convert_model
   output_data = converter.convert()
  File 
  "/home/nils/.local/lib/python3.6/site-packages/tensorflow/contrib/lite/python/lite.py", 
  line 404, in convert
   "'{0}'.".format(_tensor_name(tensor)))
  ValueError: Provide an input shape for input array 'input'.
  </code></pre>
  
  <p>Since i havn't trained the model myself, i don't know what exact shape the input had. Probably one can extract it from the classifier.py and the facenet.py found in David Sandberg's GitHubRep., at facenet/src but i don't understand the code enough to do this myself.
  I even tried to analyse the graph via tensorboard. I couldn't figure it out anyway, but maybe u can: <a href="https://i.stack.imgur.com/tG94K.png" rel="nofollow noreferrer">Tensorboard-Screenshot</a>
  As you might have already noticed, I'm quite new to Ubuntu, Tensorflow and everything related, so I am happy to take any kind of advice on this issue.
  Thank you in advance!</p>
  
  <p>This is the relevant part of classifier.py, where the model gets loaded and set up:</p>
  
  <pre><code> # Load the model
          print('Loading feature extraction model')
          facenet.load_model(args.model)
  
          # Get input and output tensors
          images_placeholder = tf.get_default_graph().get_tensor_by_name("input:0")
          embeddings = tf.get_default_graph().get_tensor_by_name("embeddings:0")
          phase_train_placeholder = tf.get_default_graph().get_tensor_by_name("phase_train:0")
          embedding_size = embeddings.get_shape()[1]
  
          # Run forward pass to calculate embeddings
          print('Calculating features for images')
          nrof_images = len(paths)
          nrof_batches_per_epoch = int(math.ceil(1.0*nrof_images / args.batch_size))
          emb_array = np.zeros((nrof_images, embedding_size))
          for i in range(nrof_batches_per_epoch):
              start_index = i*args.batch_size
              end_index = min((i+1)*args.batch_size, nrof_images)
              paths_batch = paths[start_index:end_index]
              images = facenet.load_data(paths_batch, False, False, args.image_size)
              feed_dict = { images_placeholder:images, phase_train_placeholder:False }
              emb_array[start_index:end_index,:] = sess.run(embeddings, feed_dict=feed_dict)
  
          classifier_filename_exp = os.path.expanduser(args.classifier_filename)
  </code></pre>