/hello_tf

Primary LanguageRust

Hello tensorflow

Learn tensorflow with rust & python

perpare model

  • install dependencies
pip install tensorflow
  • generate model
python pys/gen_model.py
  • test model with python
python pys/infer_local.py

rust grpc infer server

  • define infer proto

  • generate rust code

  • implement server

  • test server with rust

cargo run --bin infer_server

python grpc client

  • install dependencies
pip install grpcio-tools
  • generate python code
cd pys
python -m grpc_tools.protoc -I ../proto --python_out=. --grpc_python_out=. ../proto/infer.proto
  • test client with python
python pys/infer_client.py

Python process grpc server

  • generate python code
cd pys
python -m grpc_tools.protoc -I ../proto --python_out=. --grpc_python_out=. ../proto/process.proto