GoTFPB provides compiled golang code for tensorflow protocol buffers. Instead of compiling the protocol buffers locally, you can simply import the golang code like any other golang package.
Note: The build is failing because no unit tests have been written yet.
Each package has two sub-directories. The gen directory contains the generated Golang source code. The protos directory contains the protocol buffer definitions (proto3).
- core: fundamental protocol buffers used at the core of TensorFlow.
- framework: basic absolutely vital tensors used in TensorFlow (graph, tensor, etcetera).
- core:
- framework:
github.com/tensortask/gotfpb/core/framework
- framework:
Local compilation is not required, but if you wish to recompile the protos we reccommend using the supplied docker image.
Build the docker image by running the following commands:
git clone https://github.com/tensortask/go-proto-compiler
cd go-proto-compiler
docker build . -t go_proto_compiler
Compile the protos:
# first move to the gotfpb dir
cd $GOPATH/src/github.com/tensortask/gotfpb
# unix-based platforms
bash compile.sh
# or run the docker command (non-unix)
docker run -v $GOPATH/src/github.com/tensortask/gotfpb:/go/src/github.com/tensortask/gotfpb go_proto_compiler /bin/bash -c "export GO111MODULE=on; cd src/github.com/tensortask/gotfpb; go generate ./..."