All Projects → hereismari → Mnist Android Tensorflow

hereismari / Mnist Android Tensorflow

Handwritten digits classification from MNIST with TensorFlow on Android; Featuring Tutorial!

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Mnist Android Tensorflow

Early Stopping Pytorch
Early stopping for PyTorch
Stars: ✭ 612 (+86.59%)
Mutual labels:  tutorial, mnist
Tensorflow Tutorial
Tensorflow tutorial from basic to hard, 莫烦Python 中文AI教学
Stars: ✭ 4,122 (+1156.71%)
Mutual labels:  tutorial, tensorflow-tutorials
Androidtensorflowmnistexample
Android TensorFlow MachineLearning MNIST Example (Building Model with TensorFlow for Android)
Stars: ✭ 449 (+36.89%)
Mutual labels:  tensorflow-tutorials, mnist
Flingos
An educational operating system written in C#. A great stepping stone from high to low level development.
Stars: ✭ 451 (+37.5%)
Mutual labels:  x86, tutorial
Tensorflow Tutorials
텐서플로우를 기초부터 응용까지 단계별로 연습할 수 있는 소스 코드를 제공합니다
Stars: ✭ 2,096 (+539.02%)
Mutual labels:  tutorial, mnist
Reinforcement Learning With Tensorflow
Simple Reinforcement learning tutorials, 莫烦Python 中文AI教学
Stars: ✭ 6,948 (+2018.29%)
Mutual labels:  tutorial, tensorflow-tutorials
Awesome Tensorlayer
A curated list of dedicated resources and applications
Stars: ✭ 248 (-24.39%)
Mutual labels:  tensorflow-tutorials, mnist
Deeplearning
Deep Learning From Scratch
Stars: ✭ 66 (-79.88%)
Mutual labels:  tutorial, mnist
Gans From Theory To Production
Material for the tutorial: "Deep Diving into GANs: from theory to production"
Stars: ✭ 182 (-44.51%)
Mutual labels:  tutorial, tensorflow-tutorials
The holy book of x86
A simple guide to x86 architecture, assembly, memory management, paging, segmentation, SMM, BIOS....
Stars: ✭ 577 (+75.91%)
Mutual labels:  x86, tutorial
Reverse Engineering Tutorial
A FREE comprehensive reverse engineering tutorial covering x86, x64, 32-bit ARM & 64-bit ARM architectures.
Stars: ✭ 5,763 (+1657.01%)
Mutual labels:  x86
All About Programming
Everything about programming!!
Stars: ✭ 314 (-4.27%)
Mutual labels:  tutorial
Cmb2 Snippet Library
CMB2 Code Snippet Library
Stars: ✭ 323 (-1.52%)
Mutual labels:  tutorial
Learn React App
Application that will help you learn React fundamentals. Install this application locally - there's tutorial, code snippets and exercises. The main objective of this project is to help you get off the ground with React!
Stars: ✭ 3,364 (+925.61%)
Mutual labels:  tutorial
Cryptozombies Lesson Code
cryptozomebie lesson code
Stars: ✭ 301 (-8.23%)
Mutual labels:  tutorial
X86 Bare Metal Examples
Dozens of minimal operating systems to learn x86 system programming. Tested on Ubuntu 17.10 host in QEMU 2.10 and real hardware. Userland cheat at: https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly ARM baremetal setup at: https://github.com/cirosantilli/linux-kernel-module-cheat#baremetal-setup 学习x86系统编程的数十个最小操作系统。 已在QE…
Stars: ✭ 3,985 (+1114.94%)
Mutual labels:  x86
Bubbleshowcase Android
BubbleShowCase is a framework that let you to use informative bubbles to help your users pointing out different App features.
Stars: ✭ 313 (-4.57%)
Mutual labels:  tutorial
Ros Sensor Fusion Tutorial
An in-depth step-by-step tutorial for implementing sensor fusion with robot_localization! 🛰
Stars: ✭ 306 (-6.71%)
Mutual labels:  tutorial
Theano lstm
🔬 Nano size Theano LSTM module
Stars: ✭ 310 (-5.49%)
Mutual labels:  tutorial
First Contributions
🚀✨ Help beginners to contribute to open source projects
Stars: ✭ 21,839 (+6558.23%)
Mutual labels:  tutorial

MNIST on Android with TensorFlow

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 below.


This work was featured on a video from Siraj Raval!

Check the video demo here.

Image Beautiful art work, right? I know.

How to run this?

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

How to export my model?

A full example can be seen here

  1. Train your model

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

  3. Rewrite your model changing the variables for constants with value = in memory copy of learned variables. Example: w_save = tf.constant(_w)

    Also make sure to put names in the input and output of the model, this will be needed for the model later. Example:
    x = tf.placeholder(tf.float32, [None, 1000], name='input')
    y = tf.nn.softmax(tf.matmul(x, w_save) + b_save), name='output')

  4. Export your model with:
    tf.train.write_graph(<graph>, <path for the exported model>, <name of the model>.pb, as_text=False)

How to run my model with Android?

You basically need two things:

  1. The TensorFlow jar
    Move it to the libs folder, right click and add as library.

  2. The TensorFlow so file for the desired architecture:
    x86
    armeabi-v7a

Creat the jniLibs/x86 folder or the jniLibs/armeabi-v7a folder at the main folder.
Move it to app/src/main/jniLibs/x86/libtensorflow_inference.so or app/src/jniLibs/armeabi-v7a/libtensorflow_inference.so

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

Interacting with TensorFlow

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

Thank you, have fun!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].