You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/05/07 08:42:10 UTC

[GitHub] [incubator-mxnet] androuino commented on issue #14756: Mismatch between shape Java API

androuino commented on issue #14756: Mismatch between shape Java API
URL: https://github.com/apache/incubator-mxnet/issues/14756#issuecomment-489990506
 
 
   Hi @lanking520 again. After pulling your changes for the fix of my issue, I tried it right away but am having now a strange error using the example of **ObjectDetection.java** class but I made some alteration to it to meet my requirements. Now it looks like this:
   https://gist.github.com/androuino/7808b6fdf05e3122a03f35c63d3a5f89
   
   I followed the step by step tutorial here https://github.com/apache/incubator-mxnet/tree/master/scala-package/mxnet-demo/java-demo for running the demo.
   
   **and this is the error am having:**
   
   `SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
   SLF4J: Defaulting to no-operation (NOP) logger implementation
   SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
   [16:52:43] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.4.0. Attempting to upgrade...
   [16:52:43] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
   Exception in thread "main" java.lang.IllegalStateException: Invalid output shapes, expected: Vector(DataDesc[data,(1,3,512,512),float32,NCHW]).length, actual: ArrayBuffer((yolov30_slice_axis1_output,(1,100,1)), (yolov30_slice_axis2_output,(1,100,1)), (yolov30_slice_axis3_output,(1,100,4))).length.
   	at org.apache.mxnet.infer.ObjectDetector.getImageClassifier(ObjectDetector.scala:202)
   	at org.apache.mxnet.infer.ObjectDetector.<init>(ObjectDetector.scala:52)
   	at org.apache.mxnet.infer.javaapi.ObjectDetector.<init>(ObjectDetector.scala:58)
   	at mxnet.ObjectDetection.runObjectDetectionSingle(ObjectDetection.java:77)
   	at mxnet.ObjectDetection.main(ObjectDetection.java:86)`
   
   The image I was used to test is **512x512** in size and the model that I've trained is also set to **512**.
   
   Thanks for any enlightenment that you could give me with this error or at least tell me if I did something or missed something with the code: https://gist.github.com/androuino/7808b6fdf05e3122a03f35c63d3a5f89 .

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services