On-device training in TFLite

770 views
Skip to first unread message

Kwangkee Lee

unread,
Aug 4, 2021, 3:58:10 AM8/4/21
to TensorFlow Lite

Jaesung Chung

unread,
Aug 4, 2021, 10:08:44 PM8/4/21
to Kwangkee Lee, TensorFlow Lite
Hi Kwangkee Lee,

Team is improving on-device training use cases and we recently shared our roadmap for the on-device training use cases as a format of TensorFlow rfc .


Basically, we are improving the op stories for training use cases and multiple signatures for delivering multiple features in a single TFLite model, which are available at the master branch.

Please take a look at the above rfc.

Best regards,
Jaesung


--
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/09750afb-110a-4a62-a8db-f4a8b1b1d6e3n%40tensorflow.org.

Kwangkee Lee

unread,
Aug 5, 2021, 2:46:39 AM8/5/21
to TensorFlow Lite, Jaesung Chung, TensorFlow Lite, Kwangkee Lee
Thanks a million! Let me look into the rfc.
2021년 8월 5일 목요일 오전 11시 8분 44초 UTC+9에 Jaesung Chung님이 작성:

Jaesung Chung

unread,
Aug 11, 2021, 9:12:09 PM8/11/21
to Kwangkee Lee, TensorFlow Lite
Hi Kwangkee Lee,

Hope this helps. :-)

MoonwonKim

unread,
Aug 31, 2021, 9:18:37 PM8/31/21
to TensorFlow Lite, Jaesung Chung, kwang...@gmail.com
Hello Jaesung, 

I try to above colab example. But i faced an error in android side . 

"Op builtin_code out of range: 129. Are you using old TFLite binary with newer model?
Registration failed." 

I think this is tflite(android) version problem so i try to apply another versions  in maven repository but not worked. 

How can i test on android side? Can you give me any hints?
2021년 8월 12일 목요일 오전 10시 12분 9초 UTC+9에 Jaesung Chung님이 작성:

Jaesung Chung

unread,
Aug 31, 2021, 9:21:19 PM8/31/21
to MoonwonKim, TensorFlow Lite, kwang...@gmail.com
Please try out the tf-nightly AAR version if you are using the TensorFlow 2.6 or older versions in your android application since the above colab is using the tf-nightly version and the runtime and converter version should be matched.

dependencies {
    implementation
'org.tensorflow:tensorflow-lite:0.0.0-nightly-SNAPSHOT'
    implementation 'org.tensorflow:tensorflow-lite-select-tf-ops:0.0.0-nightly-SNAPSHOT'
}

MoonwonKim

unread,
Aug 31, 2021, 11:49:44 PM8/31/21
to TensorFlow Lite, Jaesung Chung, MoonwonKim
Thank you for your help! 

Unfortunately it still have same error with little different number 129 ->142. 
I think tf-nightly version is higher than tensorflow-lite version. 

Is "0.0.0-nightly-SNAPSHOT"  latest one? 
2021년 9월 1일 수요일 오전 10시 21분 19초 UTC+9에 Jaesung Chung님이 작성:

Jaesung Chung

unread,
Aug 31, 2021, 11:54:38 PM8/31/21
to MoonwonKim, TensorFlow Lite
Could you file a bug under the TensorFlow github with reproducible steps? It is hard to track the details within the mail thread.

Seems like your android application is still using an old TensorFlow Lite version, which does not contain the TFLite builtin VarHandle op.

Jaesung Chung

unread,
Sep 6, 2021, 6:17:02 AM9/6/21
to MoonwonKim, TensorFlow Lite
This issue has been resolved and the history can be found at https://github.com/tensorflow/tensorflow/issues/51849.

tl:dr; If there is a jcenter dependency in the build.gradle of the android application, the android application will use the outdated TensorFlow Lite snapshot. So, in the android application, it should not depend on the jcenter but the ossrh-snapshot repo like the below example:
# build.gradle
buildscript {
   repositories {
       google()
       mavenCentral()

   }
   dependencies {
       ...
   }
}

allprojects {
   repositories {
       google()
       mavenCentral()
       maven {
           name 'ossrh-snapshot'
           url 'http://oss.sonatype.org/content/repositories/snapshots'
       }
   }
}
Reply all
Reply to author
Forward
0 new messages