Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danieldk/tensorflow
Go binding for Tensorflow
https://github.com/danieldk/tensorflow
binding golang tensorflow
Last synced: 12 days ago
JSON representation
Go binding for Tensorflow
- Host: GitHub
- URL: https://github.com/danieldk/tensorflow
- Owner: danieldk
- Created: 2016-03-30T18:03:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T09:47:18.000Z (over 6 years ago)
- Last Synced: 2024-10-20T02:57:46.260Z (25 days ago)
- Topics: binding, golang, tensorflow
- Language: Go
- Size: 66.4 KB
- Stars: 131
- Watchers: 10
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Purpose
This binding was created to use Tensorflow in some existing Go projects that I
have/had. For this reason it only provides the functionality that I need(ed).
There are currently Go bindings brewing in upstream:* Source: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/go
* Issue: https://github.com/tensorflow/tensorflow/issues/10#issuecomment-245687757Once they are done, it's better the use the upstream binding, since it is always
in sync with the latest Tensorflow.# Building
Get v0.8.0 of Tensorflow and build it:
~~~{.bash}
$ git clone https://github.com/tensorflow/tensorflow.git
$ cd tensorflow
$ git checkout v0.8.0
$ git submodule init
$ git submodule update
$ ./configure
$ bazel build -c opt tensorflow:libtensorflow.so
~~~Now you need to put `tensor_c_api.h` and `libtensorflow.so` visible somewhere for cgo
and your C compiler. On OS X using Homebrew:~~~{.bash}
$ mkdir -p /usr/local/Cellar/tensorflow/0.8.0/{lib,include}
$ cp bazel-bin/tensorflow/libtensorflow.so /usr/local/Cellar/tensorflow/0.8.0/lib
$ cp tensorflow/core/public/tensor_c_api.h /usr/local/Cellar/tensorflow/0.8.0/include
$ brew link tensorflow
~~~Now you can build the Go package as normal.