rscnn icon indicating copy to clipboard operation
rscnn copied to clipboard

Some method are not implemented

Open contactmat85 opened this issue 5 years ago • 1 comments

HI, I am trying to run your demo, but loadParams from BatchNorm.rs is not implemented. The method is returning a message saying: "fastLoadParams is not implemented". The parsing operation goes ahead but when it is trying to instantiate the network is crashing after conv0 This is the error message that I got: """ 2018-11-02 13:21:16.230 5543-5543/com.rscnn.example I/LayerGraph: layer MobileNet-SSD output:,1,300,300,3 2018-11-02 13:21:16.233 5543-5543/com.rscnn.example I/LayerGraph: layer data output:,1,300,300,3 2018-11-02 13:21:16.248 5543-5543/com.rscnn.example I/LayerGraph: layer conv0 output:,1,150,150,32

--------- beginning of crash

2018-11-02 13:21:16.252 5543-5543/com.rscnn.example E/AndroidRuntime: FATAL EXCEPTION: main Process: com.rscnn.example, PID: 5543 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.rscnn.example/com.rscnn.example.activity.MainActivity}: java.lang.NullPointerException: Attempt to get length of null array at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2896) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2974) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1663) at android.os.Handler.dispatchMessage(Handler.java:108) at android.os.Looper.loop(Looper.java:206) at android.app.ActivityThread.main(ActivityThread.java:6749) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:845) Caused by: java.lang.NullPointerException: Attempt to get length of null array at com.rscnn.layers.BatchNorm.setup(BatchNorm.java:56) at com.rscnn.network.LayerGraph.init(LayerGraph.java:294) at com.rscnn.network.LayerGraph.init(LayerGraph.java:326) at com.rscnn.network.LayerGraph.init(LayerGraph.java:326) at com.rscnn.network.LayerGraph.init(LayerGraph.java:326) at com.rscnn.network.ConvNet.loadGraphFromRawData(ConvNet.java:96) at com.rscnn.network.ConvNet.(ConvNet.java:77) at com.rscnn.model.MobileNetSSD.(MobileNetSSD.java:24) at com.rscnn.example.activity.MainActivity.onCreate(MainActivity.java:50) at android.app.Activity.performCreate(Activity.java:6985) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2849) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2974) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1663) at android.os.Handler.dispatchMessage(Handler.java:108) at android.os.Looper.loop(Looper.java:206) at android.app.ActivityThread.main(ActivityThread.java:6749) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:845) 2018-11-02 13:21:16.258 965-13468/? W/ActivityManager: Force finishing activity com.rscnn.example/.activity.MainActivity """

It looks to me that is crashing when trying to instantiate the batch normalization layer after conv0.

COuld you clarify please?

Thank you very much

contactmat85 avatar Nov 02 '18 12:11 contactmat85

@contactmat85 You should merge the batch norm layers into conv layers, use my merge_bn.py in mobilenet-ssd project to do that.

chuanqi305 avatar Nov 19 '18 03:11 chuanqi305