Make the C library and JNI shared library targets Android friendly by linking with the smaller android runtime when building with --config=android Relatedly, strip all but the JNI symbols from libtensorflow_jni.so (regardless of build configuration) to trim its size down (by roughly 50%). Link in the Java libraries in the Android examples. The longer term intention is to encourage use of the TensorFlow Java API in Android and do away with the TensorFlowInferenceInterface class (and related JNI code) currently used in Android. This will provide a single, more thoroughly tested API for use in all Java settings - Android or not. An update to the Android example to switch to this will come in a follow up change. NOTES: - For expediency of this change, the C API call: TF_LoadSessionFromSavedModel is not available when building for Android. I will look into fixing that separately. - Linking in the JNI library required by the TensorFlow Java API results in a small increase (0.7%) in binary size of libtensorflow_demo.so An unrelatedly, rename libtensorflow-jni.so to libtensorflow_jni.so to be consistent with other shared libraries created in tensorflow. Change: 144320074 |
||
---|---|---|
tensorflow | ||
third_party | ||
tools | ||
util/python | ||
.gitignore | ||
.gitmodules | ||
ACKNOWLEDGMENTS | ||
ADOPTERS.md | ||
AUTHORS | ||
bower.BUILD | ||
BUILD | ||
configure | ||
CONTRIBUTING.md | ||
ISSUE_TEMPLATE.md | ||
LICENSE | ||
models.BUILD | ||
README.md | ||
RELEASE.md | ||
WORKSPACE |

Linux CPU |
Linux GPU |
Mac OS CPU |
Windows CPU |
Android |
---|---|---|---|---|
TensorFlow is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) that flow between them. This flexible architecture lets you deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device without rewriting code. TensorFlow also includes TensorBoard, a data visualization toolkit.
TensorFlow was originally developed by researchers and engineers working on the Google Brain team within Google's Machine Intelligence research organization for the purposes of conducting machine learning and deep neural networks research. The system is general enough to be applicable in a wide variety of other domains, as well.
If you'd like to contribute to TensorFlow, be sure to review the contribution guidelines.
We use GitHub issues for tracking requests and bugs, but please see Community for general questions and discussion.
Installation
See Download and Setup for instructions on how to install our release binaries or how to build from source.
People who are a little more adventurous can also try our nightly binaries:
- Linux CPU-only: Python 2 (build history) / Python 3.4 (build history) / Python 3.5 (build history)
- Linux GPU: Python 2 (build history) / Python 3.4 (build history) / Python 3.5 (build history)
- Mac CPU-only: Python 2 (build history) / Python 3 (build history)
- Mac GPU: Python 2 (build history) / Python 3 (build history)
- Android: demo APK, native libs (build history)
Try your first TensorFlow program
$ python
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> sess.run(hello)
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> sess.run(a+b)
42
>>>
##For more information
The TensorFlow community has created amazing things with TensorFlow, please see the resources section of tensorflow.org for an incomplete list.