I don’t know the reason why i couldn’t see any pre-trained model of mobilenetSSD with input size 300x300 in any MXnet’s repo (include Gluon, mxnet-ssd…). Actualy current Gluon-cv doesn’t support well to do that. So i built this model by myself.
I refered the model from Chuanqi and modify some lines here (model is
ssd_300_mobilenet1_0_voc) and i got this error when run
INFO:root:Namespace(batch_size=32, data_shape=300, dataset='voc', epochs=240, gpus='0', log_interval=1000, lr=0.001, lr_decay=0.1, lr_decay_epoch='160,200', momentum=0.9, network='mobilenet1.0', num_workers=4, resume='', save_interval=5, save_prefix='ssd_300_mobilenet1.0_voc', seed=233, start_epoch=0, val_interval=5, wd=0.0005) INFO:root:Start training from [Epoch 0] [13:57:24] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: Running performance tests to find the best convolution algorithm, this can take a while... (setting env variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable) Traceback (most recent call last): File "/home/prdcv/PycharmProjects/gvh205/gluon-cv/scripts/detection/ssd/train_ssd.py", line 303, in <module> train(net, train_data, val_data, eval_metric, ctx, args) File "/home/prdcv/PycharmProjects/gvh205/gluon-cv/scripts/detection/ssd/train_ssd.py", line 199, in train cls_preds, box_preds, cls_targets, box_targets) File "/usr/local/lib/python2.7/dist-packages/mxnet/gluon/block.py", line 541, in __call__ out = self.forward(*args) File "build/bdist.linux-x86_64/egg/gluoncv/loss.py", line 147, in forward File "<string>", line 89, in pick File "/usr/local/lib/python2.7/dist-packages/mxnet/_ctypes/ndarray.py", line 92, in _imperative_invoke ctypes.byref(out_stypes))) File "/usr/local/lib/python2.7/dist-packages/mxnet/base.py", line 252, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: Shape inconsistent, Provided = [32,1917], inferred shape=[32,2781]
this mean that i successfully build my model with 1917 priorbox, but i had no idea why the model refer to 2781 priorbox?