
204
|
第
5
章
我们可以使用
TensorFlow
saved_model_cli
工具检查导出的文件,以确定可以在服
务中使用无状态函数签名:
saved_model_cli show --dir ${export_path} \
--tag_set serve --signature_def serving_default
输出为:
The given SavedModel SignatureDef contains the following input(s):
inputs['full_text_input'] tensor_info:
dtype: DT_STRING
shape: (-1)
name: serving_default_full_text_input:0
The given SavedModel SignatureDef contains the following output(s):
outputs['positive_review_logits'] tensor_info:
dtype: DT_FLOAT
shape: (-1, 1)
name: StatefulPartitionedCall_2:0
Method name is: tensorflow/serving/predict
该签名表明预测方法以一个单元素数组作为输入(称为
full_text_input
)(实为一
个字符串),并输出一个名为
positive_review_logits ...