TensorFlow lite .pb turn .tflite Ошибка - PullRequest
0 голосов
/ 06 июня 2018

Сообщение об ошибке

 F tensorflow/contrib/lite/toco/toco.cc:76] Check failed: has_input_file != has_savedmodel_dir (0 vs. 0)Specify either input_file or savedmodel_directory flag.

замороженный_граф https://storage.googleapis.com/download.tensorflow.org/models/mobilenet_v1_1.0_224_frozen.tgz

Команда преобразования

bazel run toco  \
  input_file=/Users/dchealth/Desktop/mobilenet/frozen_graph.pb \
  output_file=/Users/dchealth/Desktop/mobilenet/frozen_graphnew.tflite \
  output_format=TFLITE \
  input_format=TENSORFLOW_GRAPHDEF \
  inference_type=FLOAT \
  input_type=FLOAT \
  input_shapes=1,128,128,3 \
  input_arrays=input \
  output_arrays=MobilenetV1/Predictions/Reshape_1

В чем причина

введите описание изображенияздесь

1 Ответ

0 голосов
/ 06 июня 2018

Я думаю, вам нужно передать '--' для флагов следующим образом.

bazel run --config=opt \
  tensorflow/contrib/lite/toco:toco -- \
  --input_file=/Users/dchealth/Desktop/mobilenet/frozen_graph.pb \
  --output_file=/Users/dchealth/Desktop/mobilenet/frozen_graphnew.tflite \
  --inference_type=FLOAT \
  --input_type=FLOAT \
  --input_shape=1,128,128,3 \
  --input_arrays=input \
  --output_arrays=MobilenetV1/Predictions/Reshape_1
...