I am following this tutorial tensorflow for poets and i created custom training data and converted it to .pb but when i try to convert .pb to .tflite using toco I am getting an error
2018-10-10 13:56:40.442130: I tensorflow/contrib/lite/toco/import_tensorflow.cc:1233] Converting unsupported operation: DecodeJpeg 2018-10-10 13:56:40.471545: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before Removing unused ops: 706 operators, 1102 arrays (0 quantized) 2018-10-10 13:56:40.485896: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] After Removing unused ops pass 1: 607 operators, 1003 arrays (0 quantized) 2018-10-10 13:56:40.502109: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before general graph transformations: 607 operators, 1003 arrays (0 quantized) 2018-10-10 13:56:40.581854: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] After general graph transformations pass 1: 129 operators, 327 arrays (0 quantized) 2018-10-10 13:56:40.584067: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] After general graph transformations pass 2: 126 operators, 321 arrays (0 quantized) 2018-10-10 13:56:40.586222: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] After general graph transformations pass 3: 125 operators, 319 arrays (0 quantized) 2018-10-10 13:56:40.588344: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before dequantization graph transformations: 125 operators, 319 arrays (0 quantized) 2018-10-10 13:56:40.590472: I tensorflow/contrib/lite/toco/allocate_transient_arrays.cc:311] Total transient array allocated size: 0 bytes, theoretical optimal value: 0 bytes. 2018-10-10 13:56:40.591866: F tensorflow/contrib/lite/toco/tflite/export.cc:304] Some of the operators in the model are not supported by the standard TensorFlow Lite runtime. If you have a custom implementation for them you can disable this error with --allow_custom_ops. Here is a list of operators for which you will need custom implementations: DecodeJpeg, ExpandDims. Aborted (core dumped)
--input_file
to--graph_def_file
. An example command line is available here. – Nupur Garg Oct 10 '18 at 20:30File "/home/infinity/.local/lib/python3.6/site-packages/tensorflow/contrib/lite/python/lite.py", line 271, in from_frozen_graph sess.graph, input_arrays) File "/home/infinity/.local/lib/python3.6/site-packages/tensorflow/contrib/lite/python/convert_saved_model.py", line 189, in get_tensors_from_tensor_names ",".join(invalid_tensors))) ValueError: Invalid tensors 'input' were found.
– Natansh Pandya Oct 10 '18 at 20:57