GitHub

Nice work by @hereismari getting started with @TensorFlow on Android!

  • If you want to make your own version of this app or want to know how to save your model and export it for Android or other devices check the very simple tutorial bellow.
  • A full example can be seen here

    Keep an in memory copy of eveything your model learned (like biases and weights) Example: , where w was learned from training.

  • Rewrite your model changing the variables for constants with value = in memory copy of learned variables.
  • Example: Also make sure to put names in the input and output of the model, this will be needed for the model later.
  • Example:

    Export your model with:

    tf.train.write_graph(, , .

mnist-android-tensorflow – Handwritten digits classification from MNIST with TensorFlow in Android; Featuring Tutorial!

@random_forests: Nice work by @hereismari getting started with @TensorFlow on Android!

Check the video demo here

Beautiful edition, I know.

Handwritten digits classification from MNIST on Android with TensorFlow.

If you want to make your own version of this app or want to know how to save your model and export it for Android or other devices check the very simple tutorial bellow.

The UI and expert-graph.pb model were taken from: https://github.com/miyosuda/TensorFlowAndroidMNIST, so thank you miyousuda.

The TensorFlow jar and so armeabi-v7a were taken from: https://github.com/MindorksOpenSource/AndroidTensorFlowMNISTExample, so thank you MindorksOpenSource.

The Tensorflow so of x86 was taken from: https://github.com/cesardelgadof/TensorFlowAndroidMNIST, so thank you cesardelgadof.

If you have no ideia what I just said above, have a look on the instructions bellow.

Just open this project with Android Studio and is ready to run, this will work with 86x and armeabi-v7a architectures.

A full example can be seen here

Train your model

Keep an in memory copy of eveything your model learned (like biases and weights) Example:

, where w was learned from training.

Also make sure to put names in the input and output of the model, this will be needed for the model later. Example:

Export your model with:

You need two things:

If you want to generate these files yourself, here is a nice tutorial of how to do it.

To interact with TensorFlow you will need an instance of TensorFlowInferenceInterface, you can see more details about it here

Thank you, have fun!

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

GitHub