mxnet-ssd
mxnet-ssd copied to clipboard
from.shape() == to->shape() operands shape mismatchfrom.shape = (84,) to.shape=(12,)
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!
Fresh training? python train.py --num-class 2 --class-names 'a,b' should work. Let me know if you have other issues.
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.
#124 Please see this, and try if it solves the problem. If so, you guys are loading the pretrained model.
My problem was the one you mentioned issue 124.
So the only solution is to add some dummy classes? @Prasad9