码迷,mamicode.com
首页 > 编程语言 > 详细

python通过grpc调用tfserving报错has no attribute 'beta_create_PredictionService_stub'

时间:2020-07-09 12:12:29      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:code   pre   tfs   ror   删除   报错   from   insecure   create   

问题背景:python通过grpc调用tfserving报错,
提示:AttributeError: module ‘tensorflow_serving.apis.prediction_service_pb2‘ has no attribute ‘beta_create_PredictionService_stub‘

原因:旧版api删除了,改用新版

from tensorflow_serving.apis import prediction_service_pb2_grpc

channel = implementations.insecure_channel(‘localhost‘, 8500)
stub = prediction_service_pb2_grpc.PredictionServiceStub(channel)

python通过grpc调用tfserving报错has no attribute 'beta_create_PredictionService_stub'

标签:code   pre   tfs   ror   删除   报错   from   insecure   create   

原文地址:https://www.cnblogs.com/bincoding/p/13272668.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!