Skip to content

Run the TensorFlow MNIST model in Android application.

Notifications You must be signed in to change notification settings

XRayCheng/mnist-android

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNIST for Android

Run the TensorFlow MNIST model in Android application.

How to Build

You need to install the following tools in advance.

  • Android SDK
  • Android NDK
  • Bazel

Fix WORKSPACE.

android_sdk_repository(
    name="androidsdk",
    path="</absolute/path/to/android-sdk>",
    api_level = <api level>,
)

android_ndk_repository(
    name = "androidndk",
    path = "</absolute/path/to/android-ndk>",
    api_level = 21,
)

Please install the following items.

  • SDK Platform Tools for specified version
  • SDK Build Tools
  • Google Support Library

Run build.

bazel build app:net.ornew.mnist.app

net.ornew.mnist.app.apk is generated in ./bazel-bin/app/.

If you want to install the application:

bazel mobile-install app:net.ornew.mnist.app

or

adb install -r bazel-bin/app/net.ornew.mnist.app.apk

How to generate MNIST model file

You need to install the following tools.

  • python
  • TensorFlow
cd model
python mnist.py

mnist.frozen.pb is generated in model/dist/.

Contacts

Arata Furukawa <info@ornew.net>

About

Run the TensorFlow MNIST model in Android application.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 48.6%
  • Python 35.4%
  • C++ 16.0%