Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

arrufat/tensorflow-vala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TensorFlow for Vala

This package contains experimental Vala bindings for TensorFlow.

Current Status

Highly experimental Vala bindings for TensorFlow, using the C API.

As a result, current support for TensorFlow is limited by the exposed functionality in the API, which can be found in the official site.

Feature Python C API Vala
Run a predefined Graph Yes Yes Yes
Graph construction Yes Yes Yes
Gradients Yes No No
Functions Yes No No
Control Flow Yes No No
Neural Network Library Yes No No

How to build

Install the TensorFlow C library

This step is the same as the one for the Rust bindings:

  1. Install SWIG and NumPy. The version from your distro's package manager should be fine for these two.
  2. Install Bazel, which you may need to do from source.
  3. git clone --recurse-submodules https://github.com/tensorflow/tensorflow
  4. cd tensorflow
  5. ./configure
  6. bazel build -c opt --jobs=1 tensorflow:libtensorflow_c.so

Install the Vala bindings

  1. Clone this repository and cd into it and:
meson build --prefix <install prefix (/usr/local by default)>
ninja -C build
ninja -C build test
sudo ninja -C build install

On Arch Linux

yaourt -S tensorflow-vala

Which will drag tensorflow as a dependency.

Disclaimer

It is worth noticing that the bindings have not been fully tested. However, it's better to try to keep up with the C API as it is being built than to do it all at once.