diff options
author | Asim Shankar <ashankar@google.com> | 2016-10-10 15:24:11 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-10-10 16:33:24 -0700 |
commit | 6586a66b1eac161221155b8bf1c2a75677623bc3 (patch) | |
tree | 32bc5e6df3be1e5fc035faeec3f365d2dd9ab50e /tensorflow/go/README.md | |
parent | 7ba74d62d7b3c4f9aa5242d061b169d703fa220d (diff) |
go: Scaffolding for a package containing wrapper functions for TensorFlow ops.
This includes:
(1) A 'genop' command-line tool that generates Go functions for each TensorFlow op registered in the address space of the process.
(2) An 'op' package that will host these generated functions and some hand-crafted
functions (like Const).
At this time, none of the generated files are being committed.
As a result, the installation instructions in README.md have been updated to
reflect how 'go generate' should be used to setup the 'op' package.
Note that even after this change, packages that clients are expected to
use ('tensorflow' and 'op') do not depend on protocol buffers (github.com/golang/protobuf).
However, the stand-alone command-line tool 'genop' does.
This change is focused on the scaffolding and introduces a dummy code generator.
The real implementation of the code generator will be done in a follow up change
as I wanted to separate these "mechanics" from the "implementation details".
Yet another step for #10
Change: 135735176
Diffstat (limited to 'tensorflow/go/README.md')
-rw-r--r-- | tensorflow/go/README.md | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tensorflow/go/README.md b/tensorflow/go/README.md index b3cfb0bd7e..9fa16b66d6 100644 --- a/tensorflow/go/README.md +++ b/tensorflow/go/README.md @@ -49,14 +49,21 @@ Construct and execute TensorFlow graphs in Go. a. Copying it to a system location, e.g., - ```sh - cp ${GOPATH}/src/github.com/tensorflow/tensorflow/bazel-bin/tensorflow/libtensorflow.so /usr/local/lib - ``` + ```sh + cp ${GOPATH}/src/github.com/tensorflow/tensorflow/bazel-bin/tensorflow/libtensorflow.so /usr/local/lib + ``` + + OR - OR + b. Setting the + `LD_LIBRARY_PATH=${GOPATH}/src/github.com/tensorflow/tensorflow/bazel-bin/tensorflow` + environment variable (`DYLD_LIBRARY_PATH` on Mac OS X). - b. Setting the `LD_LIBRARY_PATH=${GOPATH}/src/github.com/tensorflow/tensorflow/bazel-bin/tensorflow` - environment variable (`DYLD_LIBRARY_PATH` on Mac OS X). +4. Generate wrapper functions for TensorFlow ops: + + ```sh + go generate github.com/tensorflow/tensorflow/tensorflow/go/op + ``` After this, the `go` tool should be usable as normal. For example: |