我有一个训练有素的 rnn,我尝试在移动设备上使用。问题是,当我使用 toco 将.pb
文件转换为.tflite
它时失败并显示以下错误消息:
WARNING: Config values are not defined in any .rc file: opt.
INFO: Found 1 target...
Target //tensorflow/contrib/lite/toco:toco up-to-date:
bazel-bin/tensorflow/contrib/lite/toco/toco
INFO: Elapsed time: 0.287s, Critical Path: 0.00s
INFO: Running command line: bazel-bin/tensorflow/contrib/lite/toco/toco '--input_file=/Users/valentinradu/Playgrounds/char-rnn-tensorflow/remote_save/latest/graph_frz.pb' '--output_file=/Users/valentinradu/Playgrounds/char-rnn-tensorflow/remote_save/latest/graph.tflite' '--input_format=TENSORFLOW_GRAPHDEF' '--output_format=TFLITE' '--input_type=FLOAT' '--inference_type=FLOAT' '--input_shapes=1,128:1,50,50' '--input_arrays=state_in,data_in' '--output_arrays=state_out,data_out'
2017-11-16 06:48:00.156091: I tensorflow/contrib/lite/toco/import_tensorflow.cc:937] Converting unsupported operation: Fill
2017-11-16 06:48:00.156811: I tensorflow/contrib/lite/toco/import_tensorflow.cc:937] Converting unsupported operation: Fill
2017-11-16 06:48:00.156821: I tensorflow/contrib/lite/toco/import_tensorflow.cc:937] Converting unsupported operation: Pack
2017-11-16 06:48:00.156829: I tensorflow/contrib/lite/toco/import_tensorflow.cc:937] Converting unsupported operation: Pack
2017-11-16 06:48:00.156841: I tensorflow/contrib/lite/toco/import_tensorflow.cc:937] Converting unsupported operation: Unpack
2017-11-16 06:48:00.156856: I tensorflow/contrib/lite/toco/import_tensorflow.cc:937] Converting unsupported operation: StridedSlice
2017-11-16 06:48:00.156872: I tensorflow/contrib/lite/toco/import_tensorflow.cc:937] Converting unsupported operation: StridedSlice
2017-11-16 06:48:00.157260: I tensorflow/contrib/lite/toco/import_tensorflow.cc:937] Converting unsupported operation: Pack
2017-11-16 06:48:00.157277: I tensorflow/contrib/lite/toco/import_tensorflow.cc:937] Converting unsupported operation: Pack
2017-11-16 06:48:00.158053: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before general graph transformations: 40 operators, 64 arrays (0 quantized)
2017-11-16 06:48:00.158141: F tensorflow/contrib/lite/toco/graph_transformations/propagate_fixed_sizes.cc:793] Check failed: indices_shape.dimensions_count() == 1 (2 vs. 1)
现在,我知道这是因为 toco 期望我的模型只有一个输入,但是,在我发现到目前为止的示例中,人们使用 2 个输入没有问题。
它与我在模型中使用的操作有关吗?这是一个已知的限制还是一个错误?
这是我构建模型的方法。