dmlc / gluon-cv

Gluon CV Toolkit
http://gluon-cv.mxnet.io
Apache License 2.0
5.82k stars 1.21k forks source link

Cannot find argument 'valid_thresh', Possible Arguments #339

Closed ShoufaChen closed 6 years ago

ShoufaChen commented 6 years ago
INFO:root:[Epoch 0][Batch 99], Speed: 102.940 samples/sec, CrossEntropy=6.679, SmoothL1=3.165
INFO:root:[Epoch 0][Batch 199], Speed: 103.771 samples/sec, CrossEntropy=5.783, SmoothL1=2.935
INFO:root:[Epoch 0][Batch 299], Speed: 105.562 samples/sec, CrossEntropy=5.398, SmoothL1=2.811
INFO:root:[Epoch 0][Batch 399], Speed: 104.512 samples/sec, CrossEntropy=5.170, SmoothL1=2.699
INFO:root:[Epoch 0][Batch 499], Speed: 107.248 samples/sec, CrossEntropy=5.000, SmoothL1=2.629
INFO:root:[Epoch 0] Training cost: 177.013, CrossEntropy=4.977, SmoothL1=2.623
Traceback (most recent call last):
  File "train_ssd.py", line 253, in <module>
    train(net, train_data, val_data, eval_metric, ctx, args)
  File "train_ssd.py", line 218, in train
    map_name, mean_ap = validate(net, val_data, ctx, eval_metric)
  File "train_ssd.py", line 132, in validate
    ids, scores, bboxes = net(x)
  File "/home/csf/anaconda3/envs/mxnet/lib/python3.6/site-packages/mxnet/gluon/block.py", line 471, in __call__
    return self.forward(*args)
  File "/home/csf/anaconda3/envs/mxnet/lib/python3.6/site-packages/mxnet/gluon/block.py", line 705, in forward
    return self._call_cached_op(x, *args)
  File "/home/csf/anaconda3/envs/mxnet/lib/python3.6/site-packages/mxnet/gluon/block.py", line 606, in _call_cached_op
    self._build_cache(*args)
  File "/home/csf/anaconda3/envs/mxnet/lib/python3.6/site-packages/mxnet/gluon/block.py", line 565, in _build_cache
    inputs, out = self._get_graph(*args)
  File "/home/csf/anaconda3/envs/mxnet/lib/python3.6/site-packages/mxnet/gluon/block.py", line 557, in _get_graph
    out = self.hybrid_forward(symbol, *grouped_inputs, **params)  # pylint: disable=no-value-for-parameter
  File "/home/csf/.local/lib/python3.6/site-packages/gluoncv-0.3.0-py3.6.egg/gluoncv/model_zoo/ssd/ssd.py", line 212, in hybrid_forward
  File "<string>", line 121, in box_nms
  File "/home/csf/anaconda3/envs/mxnet/lib/python3.6/site-packages/mxnet/_ctypes/symbol.py", line 125, in _symbol_creator
    ctypes.byref(sym_handle)))
  File "/home/csf/anaconda3/envs/mxnet/lib/python3.6/site-packages/mxnet/base.py", line 149, in check_call
    raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: Cannot find argument 'valid_thresh', Possible Arguments:
----------------
overlap_thresh : float, optional, default=0.5
    Overlapping(IoU) threshold to suppress object with smaller score.
topk : int, optional, default='-1'
    Apply nms to topk boxes with descending scores, -1 to no restriction.
coord_start : int, optional, default='2'
    Start index of the consecutive 4 coordinates.
score_index : int, optional, default='1'
    Index of the scores/confidence of boxes.
id_index : int, optional, default='-1'
    Optional, index of the class categories, -1 to disable.
force_suppress : boolean, optional, default=0
    Optional, if set false and id_index is provided, nms will only apply to boxes belongs to the same category
in_format : {'center', 'corner'},optional, default='corner'
    The input box encoding type.
 "corner" means boxes are encoded as [xmin, ymin, xmax, ymax], "center" means boxes are encodes as [x, y, width, height].
out_format : {'center', 'corner'},optional, default='corner'
    The output box encoding type.
 "corner" means boxes are encoded as [xmin, ymin, xmax, ymax], "center" means boxes are encodes as [x, y, width, height].
, in operator _contrib_box_nms(name="", id_index="0", coord_start="2", topk="400", force_suppress="False", score_index="1", overlap_thresh="0.45", valid_thresh="0.01")

I run the script :

python train_ssd.py --gpus 0,1 -j 32 --network vgg16_atrous --data-shape 300 --dataset voc --lr 0.001 --lr-decay-epoch 160,200 --lr-decay 0.1 --epochs 240

during the training process, I met an error like above. How to solve it?

zhreshold commented 6 years ago

update mxnet to 1.3.0.post0 or use nightly build with --pre

ShoufaChen commented 6 years ago

Thank you very much. It solved my problem.