msracver / Relation-Networks-for-Object-Detection

Relation Networks for Object Detection
MIT License
1.09k stars 190 forks source link

mxnet.base.MXNetError: Error in operator _plus2: [06:13:23] src/operator/contrib/./../elemwise_op_common.h:135: Check failed: assign(&dattr, vec.at(i)): Incompatible attr in node _plus2 at 1-th input: expected [313,16,300], got [19,16,18] #43

Closed kbiyani33 closed 4 years ago

kbiyani33 commented 4 years ago

Hello, I converted the scripts to python3. My mxnet is mxnet-cu101 version 1.6.0 for CUDA10.1. But when I ran the train_endtoend.py in ./relation_rcnn I am running into the following error after the config file is read:

''' 'symbol': 'resnet_v1_101_rcnn_dcn_attention_1024_pairwise_position_multi_head_16_learn_nms'} loading annotations into memory... Done (t=0.81s) creating index... index created! num_images 7017 wrote gt roidb to ./cache/COCO_train_800x800_gt_roidb.pkl filtered 0 roidb entries: 7017 -> 7017 [('data', (1, 3, 800, 800))] [('data', (1, 3, 800, 800))] [('label', (1, 30000)), ('bbox_target', (1, 48, 50, 50)), ('bbox_weight', (1, 48, 50, 50))] providing maximum shape [('data', (1, 3, 800, 800)), ('gt_boxes', (1, 100, 5))] [('label', (1, 30000)), ('bbox_target', (1, 48, 50, 50)), ('bbox_weight', (1, 48, 50, 50))] Input Dictionary {'data': (1, 3, 800, 800), 'im_info': (1, 3), 'gt_boxes': (1, 13, 5), 'label': (1, 30000), 'bbox_target': (1, 48, 50, 50), 'bbox_weight': (1, 48, 50, 50)} infer_shape error. Arguments: data: (1, 3, 800, 800) im_info: (1, 3) gt_boxes: (1, 13, 5) label: (1, 30000) bbox_target: (1, 48, 50, 50) bbox_weight: (1, 48, 50, 50) Traceback (most recent call last): File "rcnn_end2end_train_test.py", line 23, in train_end2end.main() File "../../relation_rcnn/train_end2end.py", line 188, in main config.TRAIN.begin_epoch, config.TRAIN.end_epoch, config.TRAIN.lr, config.TRAIN.lr_step) File "../../relation_rcnn/train_end2end.py", line 101, in train_net sym_instance.infer_shape(data_shape_dict) File "../../relation_rcnn/../lib/utils/symbol.py", line 39, in infer_shape arg_shape, out_shape, aux_shape = self.sym.infer_shape(*data_shape_dict) File "/mnt/keshav/relnet_python3/lib/python3.6/site-packages/mxnet/symbol/symbol.py", line 1103, in infer_shape res = self._infer_shape_impl(False, args, **kwargs) File "/mnt/keshav/relnet_python3/lib/python3.6/site-packages/mxnet/symbol/symbol.py", line 1267, in _infer_shape_impl ctypes.byref(complete))) File "/mnt/keshav/relnet_python3/lib/python3.6/site-packages/mxnet/base.py", line 255, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: Error in operator _plus2: [06:13:23] src/operator/contrib/./../elemwise_op_common.h:135: Check failed: assign(&dattr, vec.at(i)): Incompatible attr in node _plus2 at 1-th input: expected [313,16,300], got [19,16,18] Stack trace: [bt] (0) /mnt/keshav/relnet_python3/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x6b8b5b) [0x7f1934352b5b] [bt] (1) /mnt/keshav/relnet_python3/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x878f39) [0x7f1934512f39] [bt] (2) /mnt/keshav/relnet_python3/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x8797db) [0x7f19345137db] [bt] (3) /mnt/keshav/relnet_python3/lib/python3.6/site-packages/mxnet/libmxnet.so(+0xb48036) [0x7f19347e2036] [bt] (4) /mnt/keshav/relnet_python3/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x382fe3c) [0x7f19374c9e3c] [bt] (5) /mnt/keshav/relnet_python3/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x38336a8) [0x7f19374cd6a8] [bt] (6) /mnt/keshav/relnet_python3/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x377bc31) [0x7f1937415c31] [bt] (7) /mnt/keshav/relnet_python3/lib/python3.6/site-packages/mxnet/libmxnet.so(MXSymbolInferShapeEx+0xc1) [0x7f19374162c1] [bt] (8) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7f1973c75dae] '''

Can someone please explain what might the issue exactly be?