Saving weights of Trained Model using On-Device Model Personalization

108 views
Skip to first unread message

Bhargav Jain

unread,
Oct 20, 2020, 8:37:40 AM10/20/20
to TensorFlow Lite
Hello TensorFlow Lite team,

A model trained on the device (Using the capture mode of the demo App) is getting reinitialized every time we restart the app. Is there any way to save the model or export the model trained on an Android device? I want to perform some validation and this behavior is a blocker for me.

Thank you,

YoungSeok Yoon

unread,
Oct 21, 2020, 4:05:45 AM10/21/20
to Bhargav Jain, TensorFlow Lite

--
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/0e8cb18e-256e-4350-bd04-fd6768611942n%40tensorflow.org.

Bhargav Jain

unread,
Oct 22, 2020, 9:13:29 AM10/22/20
to YoungSeok Yoon, TensorFlow Lite
Hi YoungSeok,

Thank you for your answer. I will try this and respond with the outcome. This is what I am looking for at least to save my training parameters so I do not lose them when I rerun the Application like happening in the example application.
In line with this model parameter saving functionality, Is there any way that I can export the trained model and use it for validation in python? Since I am more comfortable with python and I already have the infrastructure in place to test the model trained on the device.  If such functionality exists could you please route me to the example code if available? 

Thank you, 

YoungSeok Yoon

unread,
Oct 25, 2020, 8:14:13 PM10/25/20
to Bhargav Jain, TensorFlow Lite
I'm not sure if the parameters could be exported like that. If this is an important use case for you, please feel free to file a feature request on GitHub.

Thanks,
YoungSeok

Jerry Y

unread,
Apr 26, 2022, 10:34:03 AM4/26/22
to TensorFlow Lite, youngs...@google.com, TensorFlow Lite
Hi  YoungSeok, the examples you provided don't have the methods for saving/loading trained parameters. Can you please double check? Thanks!

Haoliang Zhang

unread,
May 9, 2022, 1:47:34 PM5/9/22
to TensorFlow Lite, eji...@gmail.com, youngs...@google.com, TensorFlow Lite
Hi,

We have launched a new on-device personalization Android demo app last year. You can check it out here:

Compared with the 2019 version, we've added support for multi-signatures and also native variable.
Reply all
Reply to author
Forward
0 new messages