MobileNetv2-SSDLite
MobileNetv2-SSDLite copied to clipboard
SSDLite --size 0.75 issue
When the train.prototxt file is generated with --size set to 0.75, and it is put to train, the model cannot be created. The error that occurs is
0731 17:29:59.393656 7533 layer_factory.hpp:77] Creating layer conv_13/expand_mbox_loc/depthwise I0731 17:29:59.393664 7533 net.cpp:100] Creating Layer conv_13/expand_mbox_loc/depthwise I0731 17:29:59.393669 7533 net.cpp:434] conv_13/expand_mbox_loc/depthwise <- conv_13/expand_conv_13/expand/relu_0_split_1 I0731 17:29:59.393677 7533 net.cpp:408] conv_13/expand_mbox_loc/depthwise -> conv_13/expand_mbox_loc/depthwise F0731 17:29:59.393751 7533 base_conv_layer.cpp:127] Check failed: channels_ % group_ == 0 (108 vs. 0) *** Check failure stack trace: *** @ 0x7fa999c735cd google::LogMessage::Fail() @ 0x7fa999c75433 google::LogMessage::SendToLog() @ 0x7fa999c7315b google::LogMessage::Flush() @ 0x7fa999c75e1e google::LogMessageFatal::~LogMessageFatal() @ 0x7fa99a44345e caffe::BaseConvolutionLayer<>::LayerSetUp() @ 0x7fa99a360372 caffe::Net<>::Init() @ 0x7fa99a361c01 caffe::Net<>::Net() @ 0x7fa99a4f13ca caffe::Solver<>::InitTrainNet() @ 0x7fa99a4f26c7 caffe::Solver<>::Init() @ 0x7fa99a4f2a6a caffe::Solver<>::Solver() @ 0x7fa99a309c83 caffe::Creator_AdamSolver<>() @ 0x40aca9 train() @ 0x4075b0 main @ 0x7fa998be3830 __libc_start_main @ 0x407dd9 _start @ (nil) (unknown) Aborted (core dumped)
Using 3 classes, nobn, relu6 --size 0.75 when generating the model. I am training from scratch.
Hi,
Solved the issue - turns out that in the ssd-lite version, the mbox_loc/depthwise and mbox_conf depthwise layers size's get scaled (twice over I think? Not sure), but the output size doesn't match the input size, which is why the groups cannot be divided. This is also the reason that using --size 0.5 works, because the groups simply group every 2 inputs to an output (i.e. it runs, but doesn't perform a depthwise convolution, it performs a 2-1 mapping convolution, and is therefore, incorrect).
Please fix the code. Thanks!
Note that the problem doesn't arise with SSD because those layers don't use depthwise separable convolutions. Thanks!