-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Mismatch between shape Java API #14756
Comments
Hey, this is the MXNet Label Bot. |
@mxnet-label-bot add [scala, bug] |
@androuino It's a general shape mismatch problem sounds like. What is the input shape of your model? Are you trying to do object detection on it? It will be better if you can share me your model and I can have a quick evaluation on it. |
Thanks @lanking520 for the response. Yes am trying to do object detection and the input shape of my model is [1, 3, 512, 512] (if this is what you're looking for). This is my symbol.json file as you have requested. |
@androuino Which version of MXNet Java are you using? |
Hi @lanking520, am using the latest mxnet version (1.4.0) both java library and for training the model in linux gpu machine. I actually trained a resnet50 model hoping that training is different from yolo but they are throwing the same error. Do you think by changing mxnet to previous version would fix the problem? Thanks for your response. |
Tried the versions starting from 1.2.0 up to 1.3.1 but without success, all these versions has no ObjectDetector class, or maybe the implementation is different. |
@androuino Thank you, I can reproduce this problem in the most recent 1.5.0-SNAPSHOT. This problem is a bug in the concat operator in Scala it seemed. I will be working on that from today on to see how I can fix it. |
Hi @lanking520 thank you for addressing this issue. I'm really looking forward for the fix. I hope it don't give you hard time fixing it. If only the java library is open source, my team could help fixing the issue as well. Anyway thank you so much, hoping to hear some good news about this issue soon. |
I would also like to ask why am getting this error also: |
@androuino Currently, we publish our CUDA package under 9.2 version, all version prior will not be supported unfortunatly. Please install CUDA 9.2 on your machine to get it work. The reason that might cause 9.2 not working is the CUDA path not properly set. As an alternative, you can use the script we use to install cuda and cudnn. For your use case it will be:
If you are interested, you can join our slack channel https://mxnet.apache.org/versions/master/community/contribute.html#slack where you will expect faster response. |
Minimum reproducible Java code:
Where as Python did not have this problem:
|
I add a PR to fix this problem. The problem is the wrong ways of concatenating the NDArrays. It used to be:
Now is:
|
Hi @lanking520, wow the fix is here already! I am now testing the fix for the Java API. I will also highly consider the script for installing CUDA in a fresh new installed Ubuntu OS. I'll be happy to join the slack channel. Thanks again for all of this. |
* add fix in the code * add unit test * update comments
Hi @lanking520. 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: 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:
The image I was used to test is 512x512 in size and the model that I've trained is also set to 512. If you want the files that am using including the test image, I could email it you. I couldn't upload it publicly so I preferred to email it directly to you. 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 . |
* add fix in the code * add unit test * update comments
* add fix in the code * add unit test * update comments
Hi, I’ve finished training the yolo3_darknet53 params and wanted to test it with Java API, however am having this error which I have no idea where it coming from:
I only have 1 class and my input image is 512 and pretrained_base=false. Any help would be much appreciated. Thank you in advance.
The text was updated successfully, but these errors were encountered: