将完全卷积模型转换为Tensorflow Lite

时间:2019-07-22 17:38:36

标签: tensorflow tensorflow-lite

我想将用于图像分割的全卷积模型从here转换为张量流精简模型。我已经保存了.pb模型并使用了以下命令:

tflite_convert --output_file=a.tflite --saved_model_dir=./ --saved_model_tag_set serve --saved_model_signature_key serving_default

但是输入形状出现错误:

ValueError: Provide an input shape for input array 'Placeholder'

$ saved_model_cli show --dir . --all

MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:

signature_def['serving_default']:
 The given SavedModel SignatureDef contains the following input(s):
   inputs['input'] tensor_info:
       dtype: DT_FLOAT
       shape: unknown_rank
       name: Placeholder:0
 The given SavedModel SignatureDef contains the following output(s):
   outputs['pred'] tensor_info:
       dtype: DT_INT64
       shape: (-1, -1, -1)
       name: content_vgg/ArgMax:0
   outputs['pred_up'] tensor_info:
       dtype: DT_INT64
       shape: (-1, -1, -1)
       name: content_vgg/ArgMax_1:0
 Method name is: tensorflow/serving/predict

我想知道是否有可能将完全卷积的网络转变为张量流精简模型。

0 个答案:

没有答案