Right now I am trying to learn Tensorflow. But I am not sure if I understand it right, i.e. if tensorflow is working for what I want to do. I have an android app which collects data from the device and trains a model using weka and store this model. Instead of weka I wanted to use Tensorflow As far as I understood here I have to train the model before. I can't train a model on the android app using tensorflow?
-
https://www.tensorflow.org/mobile.html – xro7 Nov 07 '16 at 09:57
-
Found this site before I asked here. But it also didn't really answer my question. If I have to train the model before or is it possible to train the model on the phone using tensorflow – user2348157 Nov 09 '16 at 13:31
-
I think you cant train a model on mobile device with tensorflow. You can only use a pretrained model. – xro7 Nov 09 '16 at 13:33
-
ok thanks. that's what I just was thinking. Just wanted to be sure – user2348157 Nov 09 '16 at 13:35
2 Answers
In theory you can train a model on the device. However, it generally requires huge amounts of processing power (and/or a GPU), memory (RAM) and disk space to train a model. Nobody recommends attempting to do this on a mobile device, due to the hardware and battery life constraints.
If you were doing only a limited amount of training, you might be able to do it on the device. You could also consider only training the model when the phone is plugged into a power cable and is otherwise idle (in this case you might have problems if Doze mode kicks in).
The other problem is that almost all the tutorials and code labs assume you are training the model on a powerful computer, then embedding that trained model in the application (e.g. here are some blog posts I wrote). If you do find any good examples of training a model on an Android device please share them in the comments!

- 25,433
- 17
- 100
- 173
i think you can run the tensorflow apk first (size of 106MB): https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-android/TF_BUILD_CONTAINER_TYPE=ANDROID,TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=NO_PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=android-slave/
i think if we know how the tensorflow work and we can allow the train job to the romete service such as AWS or sth. our android phone just send the data and receive the result. right?