TensorFlow-on-Android-for-Human-Activity-Recognition-with-LSTMs icon indicating copy to clipboard operation
TensorFlow-on-Android-for-Human-Activity-Recognition-with-LSTMs copied to clipboard

Model is installed but doesnt load when opened as an app

Open Akshathar8 opened this issue 4 years ago • 0 comments
trafficstars

The frozen_har.pb created following your tutorial doesn't work. also the frozen_har.pb on your github repo aslo doens't work. I am implementing this solution on a critical project. Please help me.

It gives out this error: Caused by: java.lang.RuntimeException: Failed to load model from 'file:///android_asset/colab_original.pb' at org.tensorflow.contrib.android.TensorFlowInferenceInterface.(TensorFlowInferenceInterface.java:100) at io.github.introml.activityrecognition.TensorFlowClassifier.(TensorFlowClassifier.java:23) at io.github.introml.activityrecognition.MainActivity.onCreate(MainActivity.java:55) at android.app.Activity.performCreate(Activity.java:7955) at android.app.Activity.performCreate(Activity.java:7944) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3463) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3635)  at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2175)  at android.os.Handler.dispatchMessage(Handler.java:107)  at android.os.Looper.loop(Looper.java:237)  at android.app.ActivityThread.main(ActivityThread.java:7860)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)  Caused by: java.io.IOException: Not a valid TensorFlow Graph serialization: NodeDef mentions attr 'index_type' not in Op<name=Fill; signature=dims:int32, value:T -> output:T; attr=T:type>; NodeDef: rnn/MultiRNNCellZeroState/BasicLSTMCellZeroState_1/zeros_1 = Fill[T=DT_FLOAT, index_type=DT_INT32](rnn/MultiRNNCellZeroState/BasicLSTMCellZeroState_1/concat_1, rnn/MultiRNNCellZeroState/BasicLSTMCellZeroState_1/zeros_1/Const). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). at org.tensorflow.contrib.android.TensorFlowInferenceInterface.loadGraph(TensorFlowInferenceInterface.java:392)

Please help me. I am using this solution for a critical project of mine.

Akshathar8 avatar Apr 14 '21 16:04 Akshathar8