【发布时间】:2018-01-15 22:20:04
【问题描述】:
我在 keras 中构建了一个分割模型,并希望在 tensorflow 服务中运行该模型。目前我可以导出模型并运行模型服务器,但是运行 client.py 文件时输出太大。错误是:
File "/home/.../serving/bazel-bin/tensorflow_serving/car_mask/mask_client.runfiles/tf_serving/tensorflow_serving/car_mask/mask_client.py", line 47, in <module>
result = stub.Predict(request, 10.0)
File "/usr/local/lib/python2.7/dist-packages/grpc/beta/_client_adaptations.py", line 310, in __call__
self._request_serializer, self._response_deserializer)
File "/usr/local/lib/python2.7/dist-packages/grpc/beta/_client_adaptations.py", line 196, in _blocking_unary_unary
raise _abortion_error(rpc_error_call)
grpc.framework.interfaces.face.face.AbortionError: AbortionError(code=StatusCode.RESOURCE_EXHAUSTED, details="Received message larger than max (4194349 vs. 4194304)")
如何解决这个问题?有没有办法添加任何 grpc 选项来增加 client.py 文件中的消息大小?谢谢!
【问题讨论】: