Tensorflow服务客户端不工作
我正试图建立一个程序,根据本教程,根据已经训练过的模型进行预测 为此,我使用Docker和Tensorflow作为本教程的后续服务: 运行基于此示例的客户端时: 我得到了这个错误:Tensorflow服务客户端不工作,tensorflow,tensorflow-serving,Tensorflow,Tensorflow Serving,我正试图建立一个程序,根据本教程,根据已经训练过的模型进行预测 为此,我使用Docker和Tensorflow作为本教程的后续服务: 运行基于此示例的客户端时: 我得到了这个错误: userml@userml:~/usermodel$ python tensorflow_serving_client.py --server=172.17.0.2:9000 --image=./image5578.jpg Traceback (most recent call last): File "t
userml@userml:~/usermodel$ python tensorflow_serving_client.py --server=172.17.0.2:9000 --image=./image5578.jpg
Traceback (most recent call last):
File "tensorflow_serving_client.py", line 87, in <module>
tf.app.run()
File "/home/userml/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "tensorflow_serving_client.py", line 46, in main
result = stub.Predict(request, 60.0) # 60 secs timeout
File "/home/userml/.local/lib/python2.7/site-packages/grpc/beta/_client_adaptations.py", line 324, in __call__
self._request_serializer, self._response_deserializer)
File "/home/userml/.local/lib/python2.7/site-packages/grpc/beta/_client_adaptations.py", line 210, in _blocking_unary_unary
raise _abortion_error(rpc_error_call)
grpc.framework.interfaces.face.face.AbortionError: AbortionError(code=StatusCode.INVALID_ARGUMENT, details="input size does not match signature")
userml@userml:~/usermodel$python tensorflow\u serving\u client.py--server=172.17.0.2:9000--image=。/image5578.jpg
回溯(最近一次呼叫最后一次):
文件“tensorflow_serving_client.py”,第87行,在
tf.app.run()
文件“/home/userml/.local/lib/python2.7/site packages/tensorflow/python/platform/app.py”,第48行,正在运行
_系统出口(主(_sys.argv[:1]+标志_passthrough))
文件“tensorflow_serving_client.py”,第46行,主目录
结果=存根预测(请求,60.0)#60秒超时
文件“/home/userml/.local/lib/python2.7/site packages/grpc/beta/\u client\u adaptions.py”,第324行,在调用中__
self.\u请求\u序列化程序、self.\u响应\u反序列化程序)
文件“/home/userml/.local/lib/python2.7/site packages/grpc/beta/\u client\u adaptions.py”,第210行,一元代码
引发流产错误(rpc错误调用)
grpc.framework.interfaces.face.face.堕胎错误:堕胎错误(code=StatusCode.INVALID_参数,details=“输入大小与签名不匹配”)
我怎样才能解决这个问题?
我试图找到输入大小,设置“形状[1]”,但似乎不起作用。我的模型是否有与客户端不兼容的内容
非常感谢