单机infer时出现grpc error
Created by: lexy0093
预测代码: place = fluid.CPUPlace() exe = fluid.Executor(place) [inference_program, feed_target_names, fetch_targets] = fluid.io.load_inference_model(model_path, exe)
def infer(index, feature):
idx_data = [int(i) for i in index.split(' ')]
fea_data = [float(i) for i in feature.split(' ')]
idx_data = np.array(idx_data).astype('int64').reshape([1, -1, 1])
fea_data = np.array(fea_data).astype('float32').reshape([1, -1, 1])
result = exe.run(inference_program, feed={"index": idx_data, "feature": fea_data},
fetch_list=fetch_targets, return_numpy=True)
label = np.argmax(result[0][0])
prob = result[0][0][label]
print label, prob
if name == 'main': infer('1 2 3 4 5', '0.1 0.2 0.3 0.4 0.5')
日志: I0805 14:00:02.904944 29076 rpc_client.h:101] init rpc client with trainer_id 0 F0805 14:00:02.928972 30293 grpc_client.cc:424] PrefetchRPC name:[embedding_0.tmp_0@xx:62004], ep:[xx:62004], status:[-1] meets grpc error, error_code:14 error_message:OS Error error_details: