ensorflow服务器grpc客户端接收数据非常耗时

时间:2020-03-13 06:07:56

标签: tensorflow grpc

今天,我使用retinaNet执行检测任务,并使用tensorflow服务器部署经过训练的检测模型,并在客户端上接收了检测结果。

三个大的arraysboxes(-1,4)scorelabels, 发现接收结果的过程非常耗时,将近90毫秒,代码如下:

response = result_future.result()
        for key in response.outputs:
            print('key: ', key)
            tensor_proto = response.outputs[key]
            nd_array = tf.make_ndarray(tensor_proto)
            results[key] = nd_array

我发现response = result_future.result()和 需要90毫秒。

任何人都有解决此问题的好建议,非常感谢您的帮助!

0 个答案:

没有答案