Skip to content

Commit 5779681

Browse files
committed
Add usage of cpp predict client and remove generate files
1 parent 1231cd8 commit 5779681

7 files changed

Lines changed: 29 additions & 123 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ Following are the supported features.
1616
- [x] [Python gPRC client](./python_predict_client/)
1717
- [x] [Java gPRC client](./java_predict_client/)
1818
- [x] [Scala gPRC client](./java_predict_client/)
19-
- [x] [Golang client](./golang_predict_client/)
19+
- [x] [Golang gRPC client](./golang_predict_client/)
20+
- [x] [C++ gRPC client](./cpp_predict_client/)
2021
- [ ] Spark client
21-
- [ ] C++ client
22+
- [ ] Android client
2223
- [x] Use Cases
2324
- [x] Train model
2425
- [x] Export model
@@ -38,6 +39,7 @@ Following are the supported features.
3839
- [x] Optimizers
3940
- [x] Learning rate decay
4041
- [x] Batch normalization
42+
- [ ] Distributed training
4143

4244
## Usage
4345

cpp_predict_client/README.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,35 @@
1-
# Python Predict Client
1+
# Cpp Predict Client
22

33
## Introduction
44

55
TensorFlow serving is the gRPC service for general TensorFlow models. We can implement the C++ gRPC client to predict.
66

7+
If you are using `bazel`, refer to to [inception_client.cc](https://github.com/tensorflow/serving/pull/300)
8+
79
## Usage
810

9-
1. Export the TensorFlow models.
10-
2. Run with `./predict_client.py --host 127.0.0.1 --port 9000 --model_name cancer --model_version 1`
11+
Add the binary in `tensorflow_serving/example/BUILD`.
12+
13+
```
14+
cc_binary(
15+
name = "tensorflow_model_client",
16+
srcs = [
17+
"serving_client_cpp.cc",
18+
],
19+
deps = [
20+
"//tensorflow_serving/apis:prediction_service_proto",
21+
],
22+
)
23+
```
24+
25+
Compile the project.
1126

12-
## Development
27+
```
28+
bazel build //tensorflow_serving/example:tensorflow_model_client
29+
```
1330

14-
Build protobuf from source and refer to <https://github.com/google/protobuf/blob/master/src/README.md>.
31+
Run the predict client.
1532

16-
Generetate code from proto files.
33+
```
34+
bazel-bin/tensorflow_serving/example/tensorflow_model_client
35+
```

cpp_predict_client/model.grpc.pb.cc

Lines changed: 0 additions & 21 deletions
This file was deleted.

cpp_predict_client/model.grpc.pb.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

cpp_predict_client/predict.grpc.pb.cc

Lines changed: 0 additions & 21 deletions
This file was deleted.

cpp_predict_client/predict.grpc.pb.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

cpp_predict_client/predict_client.cc

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)