📜 GoTFPB: Curated Golang TensorFlow Protocol Buffers
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.
Package Layout
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).
Imports
- core:
- framework:
github.com/tensortask/gotfpb/core/framework
- framework:
Compilation
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 ./..."