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

2021-04-23 00:28

阅读:563

标签: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


评论


亲,登录后才可以留言!