On device training in Android application

30 views
Skip to first unread message

Ashok Kumar

unread,
Feb 15, 2023, 11:26:20 AM2/15/23
to TensorFlow Lite
Hello Everyone, I would like to implement on device training for digits recognition using pre trained model from mnist dataset. From tensorflow official website and GitHub , i tried on device training and model personalization. But both are not worked. Please help me.

Haoliang Zhang

unread,
Feb 15, 2023, 6:02:20 PM2/15/23
to Ashok Kumar, TensorFlow Lite
Hi Ashok,

Could you explain what you have tried? And what's your goal with on-device training? 

On Wed, Feb 15, 2023 at 8:26 AM Ashok Kumar <ashok...@gmail.com> wrote:
Hello Everyone, I would like to implement on device training for digits recognition using pre trained model from mnist dataset. From tensorflow official website and GitHub , i tried on device training and model personalization. But both are not worked. Please help me.

--
You received this message because you are subscribed to the Google Groups "TensorFlow Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tflite+un...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tflite/7aac279a-abd4-4cc3-83a3-7dec82c72c93n%40tensorflow.org.


--
Best,
Haoliang

Ashok Kumar

unread,
Feb 27, 2023, 10:27:37 AM2/27/23
to TensorFlow Lite, haol...@google.com, TensorFlow Lite, Ashok Kumar
Hello Haoliang, 

Thanks for your Help. The mistake is on my Side, instead of using the model Personalization from the demo branch I tried to use it from the master.
The on-device Training demo app working Fine. But I noticed it is not saving training and Predictions I have done before. When I again open the App its starts from the beginning.
How do I make that model save the previous training, predictions, and accuracy?


And Also how would I apply on-device training for digit mnist recognition? I truly appreciate your help in this.

Thank you, Looking forward to your response.

Regards
Ashok
.

Haoliang Zhang

unread,
Feb 28, 2023, 12:54:47 PM2/28/23
to Ashok Kumar, Jared Lim, TensorFlow Lite
Hi Ashok,

> How do I make that model save the previous training, predictions, and accuracy?
Do you mean you want to save model's trained weights? If so, you can look at this section on how to save/restore weights from a checkpoint.  +Jared Lim if he can provide any further guidance.

> And Also how would I apply on-device training for digit mnist recognition? I truly appreciate your help in this.
You can check out this colab about how to build on-device training example end2end. I believe you just need to modify the model part to mnist model and the rest could work. Thanks!

Jared Lim

unread,
Feb 28, 2023, 8:22:52 PM2/28/23
to Haoliang Zhang, Ashok Kumar, TensorFlow Lite
Hi Ashok,

You can basically implement save and restore functions as separate signatures and call them in your Android app.
Hope that it helps!

Best regards,
Jared Lim

Reply all
Reply to author
Forward
0 new messages