Я пытаюсь квантовать Tensorflow SavedModel , используя следующую командную строку:
tflite_convert \
--output_file=/tmp/foo.tflite \
--saved_model_dir=/tmp/saved_model
Но я получаю следующую ошибку:
ValueError: No 'serving_default' in the SavedModel's SignatureDefs. Possible values are 'my model name'
Я ужепроверил, signature_def_map было определено при экспорте модели.
Команда:
saved_model_cli show --dir /tmp/mobilenet/1 --tag_set serve
возвращает
The given SavedModel MetaGraphDef contains SignatureDefs with the following keys:
SignatureDef key: 'name_of_my_model'
и:
The given SavedModel SignatureDef contains the following input(s):
inputs['is_training'] tensor_info:
dtype: DT_BOOL
shape: ()
name: is_training:0
inputs['question1_embedding'] tensor_info:
dtype: DT_FLOAT
shape: (-1, 35, 300)
name: question1_embedding:0
inputs['question2_embedding'] tensor_info:
dtype: DT_FLOAT
shape: (-1, 35, 300)
name: question2_embedding:0
The given SavedModel SignatureDef contains the following output(s):
outputs['prediction'] tensor_info:
dtype: DT_FLOAT
shape: (-1, 1)
name: prediction:0
Method name is: tensorflow/serving/predict