Skip to content

fork from tensorflow, modify some BUILD file and C lib, in order to build my own android demo

License

Notifications You must be signed in to change notification settings

liuzqt/tensorflow_android_demo

 
 

Repository files navigation

tensorflow for android demo

forked from tensorflow.

edit some BUILD file and C lib to enable build on android

this android demo run my own keyword spotting with tensorflow on android, where the keyword is 你好乐乐

I don't want to modify the whole project structure because of the complicated BUILD file and dependency hierarchy.

The android project in tensorflow/tensorflow/example/android

the model is trained with r1.1, the lib used to build android lib is r1.3 (the model can not be restored with r1.3 in python, so you have to do this with r1.1, but it can run on r1.3 based android lib)

Also, to build the .pb graph with python, you have to modify the RFFT op in c code (updated to r1.3) to enable RFFT on CPU and then compile the tensorflow by yourself.

the project is build with bazel

build cmd: bazel build -c opt //tensorflow/examples/android:tensorflow_demo --define ANDROID_TYPES=__ANDROID_TYPES_FULL__

install cmd: adb install -r bazel-bin/tensorflow/examples/android/tensorflow_demo.apk

referenced: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android

About

fork from tensorflow, modify some BUILD file and C lib, in order to build my own android demo

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 48.9%
  • Python 43.1%
  • Jupyter Notebook 3.2%
  • Go 1.7%
  • CMake 1.1%
  • Shell 0.6%
  • Other 1.4%