mxnet-ssd icon indicating copy to clipboard operation
mxnet-ssd copied to clipboard

from.shape() == to->shape() operands shape mismatchfrom.shape = (84,) to.shape=(12,)

Open lijuan123 opened this issue 7 years ago • 5 comments

Hi! I want to train the model with my own dataset. when i run the train.py. I change the setting of num_class(2) and class_name into my own, but i still have the mismatching problem. It seems that 84=(20+1)*4 and 12=(2+1)*4. I want to know if there are other places that i neet to change the setting? thank you very much! best wishes!

lijuan123 avatar Sep 18 '17 08:09 lijuan123

Fresh training? python train.py --num-class 2 --class-names 'a,b' should work. Let me know if you have other issues.

zhreshold avatar Sep 23 '17 07:09 zhreshold

Hi @zhreshold , even I am facing the same issue if I change the number of classes from default 20. I have created a separate issue for that.

@lijuan123 , this is not a solution to your problem, but since your number of classes is less than 20, you can overcome that problem by adding some dummy classes to total it to 20. Performance will not be affected but there might be small increase in time of training for each epoch. But if you are having GPU, you will not even notice it. This is how you will have to change it to: python train.py --num-class 20 --class-names 'original_class1, original_class2, dummy3, dummy4, ... dummy20' You need not give num-class input as well.

Prasad9 avatar Oct 11 '17 14:10 Prasad9

#124 Please see this, and try if it solves the problem. If so, you guys are loading the pretrained model.

zhreshold avatar Oct 11 '17 19:10 zhreshold

My problem was the one you mentioned issue 124.

Prasad9 avatar Oct 12 '17 03:10 Prasad9

So the only solution is to add some dummy classes? @Prasad9

ChangliangSun avatar Dec 27 '17 02:12 ChangliangSun