Can I train models on mobile?

Is there a library which I could use to train models on mobile? Let’s say I want to make forecasting app. First I build a model on my computer using data from last 10 years. After the model is ready I impliment it to my app. Then user someday want to update model with new data. Can he retrain the model with this new data for himself? Is that plausible with tensorflow or any other library?

It is not mainstream approach for DNN. You can try to run fine-tuning for small and simple model, but you should be prepared for low-level tech work in case of tensorflow (at least there is tensorflow for Raspberry Pi). You have strong memory constraints on mobile so it is not possible to run fine-tuning for something like Resnet. Maybe you should evaluate XGBoost or similar algorithms.

maybe something like can work for you. But it is C++

So doing image recognition is almost implausible or at least it would took way too much time on mobile?

Yes you can train on mobile, but you need to be aware of some restrictions. I’m currently working on a blog post that shows how to do this on iOS using Metal (the GPU language for Apple devices). In short: the limited memory capacity and processing speed means that you can only train on small datasets. Online learning would be a better use case than training on ImageNet from scratch, for example.

Not a lot of APIs exist current for on-device training, so you may need to roll your own. (iOS added a low-level API for this in 11.3 a few months ago.)

When you publish that blog post can you reply to these messages and give the link? If you start a new topic or something I hope you can also provide me the information because I am very interested about this. Maybe I can ask some questions if I don’t get all.

Sure thing, but it will be a while… :wink: