You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/08/24 11:52:51 UTC

[GitHub] qingzhouzhen opened a new issue #7594: pvanet Incompatible input shape, why?

qingzhouzhen opened a new issue #7594: pvanet Incompatible input shape, why?
URL: https://github.com/apache/incubator-mxnet/issues/7594
 
 
   I implemented the pvanet as the article: [pvanet](https://arxiv.org/abs/1608.08021)
   firstly I pretrained it with Imagenet and got a model, 
   then got 66*40*512 as the output, as told in the article, I put the firstly 128 channels as the input of RPN, the whole 512 channels as input of the faster R-CNN,  but I got incompatible input shape as below:
   `INFO:root:Called with argument: Namespace(begin_epoch=0, dataset='PascalVOC', dataset_path='data/VOCdevkit', end_epoch=10, frequent=20, gpus='0', image_set='2007_trainval', kvstore='device', lr=0.001, lr_step='7', network='pva', no_flip=False, no_shuffle=False, prefix='model/e2e', pretrained='model/pvanet', pretrained_epoch=0, resume=False, root_path='data', work_load_list=None)
   INFO:root:{'ANCHOR_RATIOS': [0.5, 1, 2],
    'ANCHOR_SCALES': [8, 16, 32],
    'FIXED_PARAMS': ['conv1', 'conv2'],
    'FIXED_PARAMS_SHARED': ['conv1', 'conv2', 'conv3', 'conv4', 'conv5'],
    'IMAGE_STRIDE': 0,
    'NUM_ANCHORS': 9,
    'NUM_CLASSES': 21,
    'PIXEL_MEANS': array([ 103.939,  116.779,  123.68 ]),
    'RCNN_FEAT_STRIDE': 16,
    'RPN_FEAT_STRIDE': 16,
    'SCALES': [(1056, 640)],
    'TEST': {'BATCH_IMAGES': 1,
             'CXX_PROPOSAL': True,
             'HAS_RPN': False,
             'NMS': 0.3,
             'PROPOSAL_MIN_SIZE': 16,
             'PROPOSAL_NMS_THRESH': 0.7,
             'PROPOSAL_POST_NMS_TOP_N': 2000,
             'PROPOSAL_PRE_NMS_TOP_N': 20000,
             'RPN_MIN_SIZE': 16,
             'RPN_NMS_THRESH': 0.7,
             'RPN_POST_NMS_TOP_N': 300,
             'RPN_PRE_NMS_TOP_N': 6000},
    'TRAIN': {'ASPECT_GROUPING': True,
              'BATCH_IMAGES': 1,
              'BATCH_ROIS': 128,
              'BBOX_MEANS': [0.0, 0.0, 0.0, 0.0],
              'BBOX_NORMALIZATION_PRECOMPUTED': True,
              'BBOX_REGRESSION_THRESH': 0.5,
              'BBOX_STDS': [0.1, 0.1, 0.2, 0.2],
              'BBOX_WEIGHTS': array([ 1.,  1.,  1.,  1.]),
              'BG_THRESH_HI': 0.5,
              'BG_THRESH_LO': 0.0,
              'CXX_PROPOSAL': True,
              'END2END': True,
              'FG_FRACTION': 0.25,
              'FG_THRESH': 0.5,
              'RPN_BATCH_SIZE': 256,
              'RPN_BBOX_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
              'RPN_CLOBBER_POSITIVES': False,
              'RPN_FG_FRACTION': 0.5,
              'RPN_MIN_SIZE': 16,
              'RPN_NEGATIVE_OVERLAP': 0.3,
              'RPN_NMS_THRESH': 0.4,
              'RPN_POSITIVE_OVERLAP': 0.7,
              'RPN_POSITIVE_WEIGHT': -1.0,
              'RPN_POST_NMS_TOP_N': 12000,
              'RPN_PRE_NMS_TOP_N': 12000}}
   INFO:root:voc_2007_trainval num_images 5011
   INFO:root:voc_2007_trainval gt roidb loaded from data/cache/voc_2007_trainval_gt_roidb.pkl
   INFO:root:voc_2007_trainval append flipped images to roidb
   INFO:root:load data: filtered 0 roidb entries: 10022 -> 10022
   INFO:root:providing maximum shape [('data', (1, 3, 1056, 640)), ('gt_boxes', (1, 100, 5))] [('label', (1, 23760)), ('bbox_target', (1, 36, 66, 40)), ('bbox_weight', (1, 36, 66, 40))]
   INFO:root:output shape {'bbox_loss_reshape_output': (1L, 128L, 84L),
    'blockgrad0_output': (1L, 128L),
    'cls_prob_reshape_output': (1L, 128L, 21L),
    'rpn_bbox_loss_output': (1L, 36L, 30L, 40L),
    'rpn_cls_prob_output': (1L, 2L, 270L, 40L)}
   INFO:root:lr 0.001000 lr_epoch_diff [7] lr_iters [70154]
   [20:36:13] src/operator/././cudnn_algoreg-inl.h:65: 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)
   [20:36:22] src/operator/././cudnn_algoreg-inl.h:65: 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)
   infer_shape error. Arguments:
   [20:36:25] /home/dlmxnet/hanqing/incubator-mxnet/dmlc-core/include/dmlc/./logging.h:308: [20:36:25] **
   
   - [ ] src/operator/./concat-inl.h:166: Check failed: shape_assign(&(*in_shape)[i], dshape) Incompatible input shape: expected (1,0,27,40), got (1,384,28,40)
   - [ ]   data: (1, 3, 426, 640)
   
   **
   
   Stack trace returned 10 entries:
   [bt] (0) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x29) [0x7fdea9c701e9]
   [bt] (1) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZNK5mxnet2op10ConcatProp10InferShapeEPSt6vectorIN4nnvm6TShapeESaIS4_EES7_S7_+0x892) [0x7fdeaabad082]
   [bt] (2) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(+0x13f7008) [0x7fdeaa8e7008]
   [bt] (3) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(+0x276e3c1) [0x7fdeabc5e3c1]
   [bt] (4) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(+0x276fbb2) [0x7fdeabc5fbb2]
   [bt] (5) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(+0x27704d6) [0x7fdeabc604d6]
   [bt] (6) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZN4nnvm11ApplyPassesENS_5GraphERKSt6vectorISsSaISsEE+0x501) [0x7fdeabc7c141]
   [bt] (7) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZN4nnvm9ApplyPassENS_5GraphERKSs+0x8e) [0x7fdeaac215de]
   [bt] (8) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZN4nnvm4pass10InferShapeENS_5GraphESt6vectorINS_6TShapeESaIS3_EESs+0x24e) [0x7fdeaac242de]
   [bt] (9) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(MXSymbolInferShape+0x14b6) [0x7fdeaac1cce6]
   
   Traceback (most recent call last):
     File "/home/dlmxnet/hanqing/incubator-mxnet/example/rcnn/train_end2end.py", line 185, in <module>
       main()
     File "/home/dlmxnet/hanqing/incubator-mxnet/example/rcnn/train_end2end.py", line 182, in main
       lr=args.lr, lr_step=args.lr_step)
     File "/home/dlmxnet/hanqing/incubator-mxnet/example/rcnn/train_end2end.py", line 144, in train_net
       arg_params=arg_params, aux_params=aux_params, begin_epoch=begin_epoch, num_epoch=end_epoch)
     File "/home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/module/base_module.py", line 499, in fit
       next_data_batch = next(data_iter)
     File "/home/dlmxnet/hanqing/incubator-mxnet/example/rcnn/rcnn/core/loader.py", line 303, in next
       self.get_batch()
     File "/home/dlmxnet/hanqing/incubator-mxnet/example/rcnn/rcnn/core/loader.py", line 370, in get_batch
       _, feat_shape, _ = self.feat_sym.infer_shape(**data_shape)
     File "/home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/symbol.py", line 961, in infer_shape
       res = self._infer_shape_impl(False, *args, **kwargs)
     File "/home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/symbol.py", line 1090, in _infer_shape_impl
       ctypes.byref(complete)))
     File "/home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/base.py", line 102, in check_call
       raise MXNetError(py_str(_LIB.MXGetLastError()))
   mxnet.base.MXNetError: Error in operator concat: [20:36:25] src/operator/./concat-inl.h:166: Check failed: shape_assign(&(*in_shape)[i], dshape) Incompatible input shape: expected (1,0,27,40), got (1,384,28,40)
   
   Stack trace returned 10 entries:
   [bt] (0) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x29) [0x7fdea9c701e9]
   [bt] (1) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZNK5mxnet2op10ConcatProp10InferShapeEPSt6vectorIN4nnvm6TShapeESaIS4_EES7_S7_+0x892) [0x7fdeaabad082]
   [bt] (2) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(+0x13f7008) [0x7fdeaa8e7008]
   [bt] (3) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(+0x276e3c1) [0x7fdeabc5e3c1]
   [bt] (4) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(+0x276fbb2) [0x7fdeabc5fbb2]
   [bt] (5) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(+0x27704d6) [0x7fdeabc604d6]
   [bt] (6) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZN4nnvm11ApplyPassesENS_5GraphERKSt6vectorISsSaISsEE+0x501) [0x7fdeabc7c141]
   [bt] (7) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZN4nnvm9ApplyPassENS_5GraphERKSs+0x8e) [0x7fdeaac215de]
   [bt] (8) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(_ZN4nnvm4pass10InferShapeENS_5GraphESt6vectorINS_6TShapeESaIS3_EESs+0x24e) [0x7fdeaac242de]
   [bt] (9) /home/dlmxnet/anaconda2/envs/hanqing/lib/python2.7/site-packages/mxnet-0.10.1-py2.7.egg/mxnet/libmxnet.so(MXSymbolInferShape+0x14b6) [0x7fdeaac1cce6]
   
   
   Process finished with exit code 1`
   
   the special two line above I have outlined it, anyone can help me? 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services