Phone Coding Idea – Python Machine Learning via Android App Termux and pip (sklearn, keras)

With an external keyboard you can get started with machine learning on the phone. The procedure is not perfect. But I attached some screenshots. The main app to use is Termux. It does not hog the cpu as much or not at all.

For termux you need the ¬†“pointless” repository that installs gcc, scipy and numpy. The rest can be installed by pip.

DONT run all cpu cores on the phone. My phone (8 cores) overheated temporarily shutting own one core. However this is probably not healthy for the phone.

You can limit the number of used cores by limiting numpy, see screenshot. I limited it to just two cores. I ran some test for keras using theano as the backend. I also got sklearn installed from pip.

You can use pip to install jupyter. It installs a http server app you then access from the regular android webbrowser “localhost:8888”.

With this I think you can follow some online courses on machine learning that does not use the GPU.

90 seconds per batch 2 cores mnist_mlp.py (theano)