-
Notifications
You must be signed in to change notification settings - Fork 105
Description
I succeeded on building beginner.py and expert.py to beginner-graph.pb and expert-graph.pb files to be used in the Android project. But when I replaced these files in the app/src/main/assets/ only beginner-graph.pb works, expert-graph.pb does not work.
Do you have any idea?
(I have modified file DigitDetector.java in lines 43 and 46 to use beginner-graph.pb and expert-graph.pb, respectively).
I copy the error log as follows:
10-21 10:43:13.357 28693-28693/jp.narr.tensorflowmnist W/linker: libtensorflow_mnist.so: unused DT entry: type 0x6ffffffe arg 0x1e9c
10-21 10:43:13.357 28693-28693/jp.narr.tensorflowmnist W/linker: libtensorflow_mnist.so: unused DT entry: type 0x6fffffff arg 0x3
10-21 10:43:13.739 28693-28693/jp.narr.tensorflowmnist I/native: tensorflow_jni.cc:62 Loading Tensorflow.
10-21 10:43:13.739 28693-28693/jp.narr.tensorflowmnist I/native: tensorflow_jni.cc:63 Making new SessionOptions.
10-21 10:43:13.739 28693-28693/jp.narr.tensorflowmnist I/native: tensorflow_jni.cc:67 Got config, 0 devices
10-21 10:43:13.744 28693-28693/jp.narr.tensorflowmnist I/native: tensorflow_jni.cc:69 Session created.
10-21 10:43:13.744 28693-28693/jp.narr.tensorflowmnist I/native: tensorflow_jni.cc:73 Graph created.
10-21 10:43:13.744 28693-28693/jp.narr.tensorflowmnist I/native: tensorflow_jni.cc:78 Acquired AssetManager.
10-21 10:43:13.744 28693-28693/jp.narr.tensorflowmnist I/native: tensorflow_jni.cc:80 Reading file to proto: file:///android_asset/expert-graph.pb
10-21 10:43:13.744 28693-28693/jp.narr.tensorflowmnist I/native: jni_utils.cc:120 Opening asset expert-graph.pb from disk with zero-copy.
10-21 10:43:13.764 28693-28693/jp.narr.tensorflowmnist I/native: tensorflow_jni.cc:84 Creating session.
10-21 10:43:13.779 28693-28693/jp.narr.tensorflowmnist E/native: tensorflow_jni.cc:89 Could not create Tensorflow Graph: Invalid argument: NodeDef mentions attr 'Tshape' not in Op<name=Reshape; signature=tensor:T, shape:int32 -> output:T; attr=T:type>; NodeDef: Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32](input, Reshape/shape)
10-21 10:43:13.782 28693-28693/jp.narr.tensorflowmnist I/MainActivity: Detector setup failed
10-21 10:43:13.883 28693-28693/jp.narr.tensorflowmnist D/AndroidRuntime: Shutting down VM
--------- beginning of crash
10-21 10:43:13.884 28693-28693/jp.narr.tensorflowmnist E/AndroidRuntime: FATAL EXCEPTION: main
Process: jp.narr.tensorflowmnist, PID: 28693
java.lang.RuntimeException: Unable to resume activity {jp.narr.tensorflowmnist/jp.narr.tensorflowmnist.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void jp.narr.tensorflowmnist.DrawView.onResume()' on a null object reference
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3050)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3081)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2447)
at android.app.ActivityThread.access$800(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:211)
at android.app.ActivityThread.main(ActivityThread.java:5373)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void jp.narr.tensorflowmnist.DrawView.onResume()' on a null object reference
at jp.narr.tensorflowmnist.MainActivity.onResume(MainActivity.java:84)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1262)
at android.app.Activity.performResume(Activity.java:6120)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3039)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3081)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2447)
at android.app.ActivityThread.access$800(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:211)
at android.app.ActivityThread.main(ActivityThread.java:5373)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
10-21 10:43:35.680 28693-28693/jp.narr.tensorflowmnist I/Process: Sending signal. PID: 28693 SIG: 9