Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorflow for Android and Windows #111

Closed
bhack opened this issue Nov 11, 2015 · 13 comments
Closed

Tensorflow for Android and Windows #111

bhack opened this issue Nov 11, 2015 · 13 comments
Assignees

Comments

@bhack
Copy link

bhack commented Nov 11, 2015

Do you think that the new google tensorflow will be presettable?

@saudet
Copy link
Member

saudet commented Nov 11, 2015 via email

@bhack
Copy link
Author

bhack commented Nov 22, 2015

Some more info on the c++ interfaces

absalomedia added a commit to absalomedia/tensile that referenced this issue Nov 27, 2015
@saudet saudet changed the title Tensorflow Tensorflow for Android and Windows Jan 17, 2016
@saudet
Copy link
Member

saudet commented Jan 17, 2016

It should be possible to make a build for Android with the cross-compiling functionality of Bazel explained here: https://github.com/bazelbuild/examples/tree/master/android-ndk

As for Windows, we'll have to wait until Bazel itself starts supporting builds on it...

@andreas-eberle
Copy link
Contributor

I had a look at the Android build. The most important thing is to patch the WORKSPACE file (see https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android#to-buildinstallrun).

The thing is, that we'll need to specify the path to the local NDK in there. From what I saw, it is not possible to use environment variables in the WORKSPACE file. @saudet: How would you set the path in there dynamically with the path provided by the user to the cppbuild.sh script?

@saudet
Copy link
Member

saudet commented Sep 29, 2016

Create a patch, like we have to do with FFmpeg, for example:
https://github.com/bytedeco/javacpp-presets/tree/master/ffmpeg

@saudet
Copy link
Member

saudet commented Oct 30, 2016

@andreas-eberle Could you update your patch for TensorFlow 0.11.0rc1?
It doesn't seem to work anymore: c9cf2a8
Send a PR against the tensorflow branch if you could. Thanks!

@andreas-eberle
Copy link
Contributor

I will see if I can fix it.

@andreas-eberle
Copy link
Contributor

@saudet: I have a fixed version. However, it depends on two fixes in tensorflow being merged into the r0.11 branch (see issue tensorflow/tensorflow#5374 and PR tensorflow/tensorflow#5135). I'll keep you updated.

@saudet
Copy link
Member

saudet commented Nov 5, 2016 via email

@andreas-eberle
Copy link
Contributor

@saudet: Unfortunately the TensorFlow guys decided that they won't include the improved/fixed python_config.sh file into the r0.11 release. That's why I created a patch to use the fixed version from master. I sent you a PR for your tensorflow branch.

@andreas-eberle
Copy link
Contributor

@saudet: Tensorflow seems to support Windows now. I will try to get it working.

@saudet
Copy link
Member

saudet commented Dec 26, 2017

I've investigated on how we could proceed for Windows, and here's what I found:

saudet added a commit that referenced this issue Apr 10, 2018
 * Add Android utility classes from the official Java API of TensorFlow
saudet added a commit that referenced this issue Apr 10, 2018
 * Add Android utility classes from the official Java API of TensorFlow
@saudet
Copy link
Member

saudet commented Apr 11, 2018

It turns out that we don't need Anaconda when not building the bindings for Python. An artifact for Windows is now available, but until the next full release, since tensorflow-platform doesn't include the windows-x86_64 platform, we need to add it separately:

        <dependency>
            <groupId>org.bytedeco.javacpp-presets</groupId>
            <artifactId>tensorflow</artifactId>
            <version>1.7.0-1.4.1</version>
            <classifier>windows-x86_64</classifier>
        </dependency>

But that's it! Enjoy and thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants