Questions regarding on-device training and FL

39 views
Skip to first unread message

Ewen Wang

unread,
Feb 27, 2023, 11:22:52 PM2/27/23
to TensorFlow Lite
Hi there, 

I have a couple of questions related to the support of on-device training to enable FL. 

1. Does the training example mentioned here work on iOS given the TF select op set are used? If not, what are the current limitations? 
2. Is it possible to extract and update model weights using functions as signatures? For example, one function for set_weights() that takes a list of weights as inputs before training and one function for get_weights() that returns a list of weights after training. Would such functions work on the Android / iOS interpreter?

From my understanding, if 2 is feasible with the latest TFLite, then cross-device FL should be implementable?

Thanks,
Ewen

Haoliang Zhang

unread,
Feb 28, 2023, 1:46:46 PM2/28/23
to Ewen Wang, Yishuang Pang, TensorFlow Lite
Hi Ewen,

1. We haven't yet tested this example on iOS yet. The flex delegate for training isn't that different from inference use case, so should be able to port to work on iOS as well. +Yishuang Pang 
2. We are implementing this with the save/restore weights signatures. Basically, it uses TF v1 Checkpoint format to read/serialize weights from the model. This can work with FL if you have corresponding upper-level infrastructure support to gather/merge weights.

--
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/ba24f590-9205-4273-bf04-820d322e6185n%40tensorflow.org.


--
Best,
Haoliang

Ewen Wang

unread,
Mar 7, 2023, 10:24:21 AM3/7/23
to TensorFlow Lite, haol...@google.com, TensorFlow Lite, Ewen Wang, yp...@google.com
Hi all, 

Are signature supported on iOS TFLite interpreter? If so, do you have any examples?

This doc mentions that "Support for C/iOS/Swift is not available yet", not sure if it's outdated:


Thanks,
Ewen

Haoliang Zhang

unread,
Mar 7, 2023, 12:42:46 PM3/7/23
to Ewen Wang, TensorFlow Lite, yp...@google.com
I believe signature is supported on iOS APIs. +Yishuang Pang could you help answer? thanks!
--
Best,
Haoliang

Ashok Kumar

unread,
Mar 13, 2023, 1:40:05 PM3/13/23
to TensorFlow Lite, haol...@google.com, TensorFlow Lite, yp...@google.com, Ewen Wang
Dear All,

I hope this email finds you in good health and high spirits. I am writing to seek your assistance with my recent project involving TensorFlow/example repo. I have successfully created an on-device training app that allows me to continuously train a model from my mobile device, thus improving its accuracy.

However, I have a doubt regarding the functionality of the app. When I click on a particular square box that represents a class, label name or symbol, I am not certain if the image data captured by the camera for that label is being stored. The camera appears to be static as if the camera app is opening and capturing any image. Can anyone help me clarify this matter?

Additionally, I would like to incorporate image samples from my mobile gallery for digit recognition. Could someone kindly guide me on how to do this?

Finally, I am working with 5 TensorFlow Lite models, namely "bottleneck", "inference", "initialize", "optimizer", and "train_head". I am encountering difficulty in determining which of these models is the base model. I need to replace it with the digits MNIST model. Can anyone help me with this task?

I would greatly appreciate your guidance and expertise in this matter. Attached is the demo video of my app for your reference.

Thank you for your time and consideration.

Best regards,
Ashok Kumar 


here's the demo video of the app. 

Haoliang Zhang

unread,
Mar 17, 2023, 7:52:23 PM3/17/23
to Ashok Kumar, Jared Lim, TensorFlow Lite, yp...@google.com, Ewen Wang
+Jared Lim Hi Jared, can you help answer the app issue?


>Finally, I am working with 5 TensorFlow Lite models, namely "bottleneck", "inference", "initialize", "optimizer", and "train_head". I am encountering difficulty in determining which of these models is the base model. I need to replace it with the digits MNIST model. Can anyone help me with this task?

Have you tried using signatures? Having 5 different tflite models doesn't seem to easy to work with..
--
Best,
Haoliang
Reply all
Reply to author
Forward
0 new messages