权重量化后的Tensorflow模型错误

时间:2019-03-12 08:38:20

标签: python tensorflow tensorflow-serving

在对模型的权重进行量化之后,将其保存为TF服务,尽管能够比以前更慢,但我能够得到预测。

但是,在Quantizing权重以及模型之后,然后将其保存以用于服务和使用它,我从客户端收到以下错误 在tf服务docker容器(tensorflow / serving:latest-gpu)中的V100上运行此命令-客户端和模型

  

_Rendezvous:<_的RPC终止,终止于:status = StatusCode.UNIMPLEMENTED details =“在[1,9,4]和   尚不支持[221,1,4]。 [[{{节点   anchors_3 / add_2 / eightbit}}]] [[{{node   filter_detections / map / while / non_max_suppression_47 / NonMaxSuppressionV3}}]]“     debug_error_string =   “ {” created“:” @ 1552349235.607723578“,” description“:”从收到错误   peer”,“文件”:“ src / core / lib / surface / call.cc”,“ file_line”:1017,“ grpc_message”:“广播   尚不支持[1,9,4]和[221,1,4]之间的值。\ n \ t [[{{node   anchors_3 / add_2 / eightbit}}]] \ n \ t [[{{node   filter_detections / map / while / non_max_suppression_47 / NonMaxSuppressionV3}}]“”,“ grpc_status”:12}“

在TF服务端,出现以下错误

  

2019-03-12 00:07:13.149087:我   外部/ org_tensorflow / tensorflow /核心/内核/quantized_add_op.cc:546]   ndims = 3 2019-03-12 00:07:13.149233:我   外部/ org_tensorflow / tensorflow /核心/内核/quantized_add_op.cc:547]   bcast.x_reshape()= [1,9,4] 2019-03-12 00:07:13.149309:我   外部/ org_tensorflow / tensorflow /核心/内核/quantized_add_op.cc:549]   bcast.y_reshape()= [221,1,4] 2019-03-12 00:07:13.149348:我   外部/ org_tensorflow / tensorflow /核心/内核/quantized_add_op.cc:551]   bcast.x_bcast()= [221,1,1] 2019-03-12 00:07:13.149385:我   外部/ org_tensorflow / tensorflow /核心/内核/quantized_add_op.cc:553]   bcast.y_bcast()= [1,9,1]

模型是图像检测模型

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

signature_def['serving_default']:
  The given SavedModel SignatureDef contains the following input(s):
    inputs['input_image'] tensor_info:
        dtype: DT_FLOAT
        shape: (-1, -1, -1, 3)
        name: input_1_2:0
  The given SavedModel SignatureDef contains the following output(s):
    outputs['filtered_detections/map/TensorArrayStack/TensorArrayGatherV3:0'] tensor_info:
        dtype: DT_FLOAT
        shape: (-1, 300, 4)
        name: filtered_detections/map/TensorArrayStack/TensorArrayGatherV3:0
    outputs['filtered_detections/map/TensorArrayStack_1/TensorArrayGatherV3:0'] tensor_info:
        dtype: DT_FLOAT
        shape: (-1, 300)
        name: filtered_detections/map/TensorArrayStack_1/TensorArrayGatherV3:0
    outputs['filtered_detections/map/TensorArrayStack_2/TensorArrayGatherV3:0'] tensor_info:
        dtype: DT_INT32
        shape: (-1, 300)
        name: filtered_detections/map/TensorArrayStack_2/TensorArrayGatherV3:0
  Method name is: tensorflow/serving/predict

0 个答案:

没有答案