Model Personalization for Digit Classifier Application #452
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello Everyone,
I want to implement on-device training for the digit Recognition App. I don't understand how to customize the Model Personalization for the digits training and inference. I would like to add images from the gallery and use that images to train the model. I would like to continuously train and improve the model in mobile.
I am getting some run time issues, can anyone help me to resolve this? Please
2023-03-16 15:16:37.707 28368-28427/org.tensorflow.lite.examples.transfer E/AndroidRuntime: FATAL EXCEPTION: Thread-3 Process: org.tensorflow.lite.examples.transfer, PID: 28368 java.lang.RuntimeException: Exception occurred during model training at org.tensorflow.lite.examples.transfer.TransferLearningModelWrapper.lambda$new$0$TransferLearningModelWrapper(TransferLearningModelWrapper.java:61) at org.tensorflow.lite.examples.transfer.-$$Lambda$TransferLearningModelWrapper$0a967PsxF3rxXg_r_Z2IwiK2HkA.run(Unknown Source:2) at java.lang.Thread.run(Thread.java:1012) Caused by: java.lang.IllegalArgumentException: Cannot copy to a TensorFlowLite tensor (placeholder_labels) with 320 bytes from a Java Buffer with 400 bytes. at org.tensorflow.lite.Tensor.throwIfSrcShapeIsIncompatible(Tensor.java:447) at org.tensorflow.lite.Tensor.setTo(Tensor.java:189) at org.tensorflow.lite.NativeInterpreterWrapper.run(NativeInterpreterWrapper.java:200) at org.tensorflow.lite.Interpreter.runForMultipleInputsOutputs(Interpreter.java:374) at org.tensorflow.lite.examples.transfer.api.LiteTrainHeadModel.calculateGradients(LiteTrainHeadModel.java:81) at org.tensorflow.lite.examples.transfer.api.TransferLearningModel.lambda$train$1$TransferLearningModel(TransferLearningModel.java:290) at org.tensorflow.lite.examples.transfer.api.-$$Lambda$TransferLearningModel$gj-qJeX1_hIp_JZoWfWwMuu417A.call(Unknown Source:6) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012)
what changes I have to do , to make Application run. I Truly appreciate your help in this.