Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some method are not implemented #2

Open
contactmat85 opened this issue Nov 2, 2018 · 1 comment
Open

Some method are not implemented #2

contactmat85 opened this issue Nov 2, 2018 · 1 comment

Comments

@contactmat85
Copy link

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

@chuanqi305
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants