chuanqi305 / SqueezeNet-SSD

SSD detection network of SqueezeNet, with pretrained weights on VOC0712 and mAP=0.643
64 stars 35 forks source link

Parameters to change for training custom data #7

Open VintonyPadmadiredja opened 6 years ago

VintonyPadmadiredja commented 6 years ago

Hi,

I'm looking to train my own data using 2 classes, I was wondering which parameters do I need to change in the train, test and deploy prototxt file. I've tried changing num_classes and num_output accordingly to how it was done in gen_model.sh file from the MobileNet repo but not having much luck after running train.sh

F0122 12:32:31.452081 6023 multibox_loss_layer.cpp:141] Check failed: numpriors * numclasses == bottom[1]->channels() (16060 vs. 120104) Number of priors must match number of confidence predictions. Check failure stack trace: @ 0x7f88d3fdcdaa (unknown) @ 0x7f88d3fdcce4 (unknown) @ 0x7f88d3fdc6e6 (unknown) @ 0x7f88d3fdf687 (unknown) @ 0x7f88d4828100 caffe::MultiBoxLossLayer<>::Reshape() @ 0x7f88d47043dc caffe::Net<>::Init() @ 0x7f88d4705265 caffe::Net<>::Net() @ 0x7f88d487360a caffe::Solver<>::InitTrainNet() @ 0x7f88d487461c caffe::Solver<>::Init() @ 0x7f88d487494a caffe::Solver<>::Solver() @ 0x7f88d4892926 caffe::Creator_RMSPropSolver<>() @ 0x40f82e caffe::SolverRegistry<>::CreateSolver() @ 0x408874 train() @ 0x40627c main @ 0x7f88d2fe4f45 (unknown) @ 0x406aeb (unknown) @ (nil) (unknown) train.sh: line 10: 6023 Aborted (core dumped) ../../caffe/build/tools/caffe train -solver="solver_train.prototxt" -weights="squeezenet_iter_74000.caffemodel" -gpu 0,1

Any help? Thank you!

HansRen1024 commented 6 years ago
  1. You should not add "-weights" parameter
  2. Change all 126 to 12, 84 to 8 and 21 to 2 in prototxt files
RamatovInomjon commented 4 years ago

@HandsomeHans , @chuanqi305 what about for n class dataset? Thanks in advance !

  1. You should not add "-weights" parameter
  2. Change all 126 to 12, 84 to 8 and 21 to 2 in prototxt files
HansRen1024 commented 4 years ago

@RamatovInomjon Change all 126 to 6N, 84 to 4N and 21 to N in prototxt files.

RamatovInomjon commented 4 years ago

@RamatovInomjon Change all 126 to 6_N, 84 to 4_N and 21 to N in prototxt files.

Thanks again!