ijkguo / mx-rcnn

Parallel Faster R-CNN implementation with MXNet.
Other
669 stars 292 forks source link

AssertionError: bn_data_gamma not initialized #92

Closed aritrasep closed 5 years ago

aritrasep commented 6 years ago

Currently facing the following error while training end2end with resnet on VOC2007 dataset: INFO:root:Called with argument: Namespace(begin_epoch=0, dataset='PascalVOC', dataset_path='/media/aritra/Data/Aritra/Datasets/VOCdevkit/', end_epoch=10, frequent=20, gpus='0', image_set='2007_trainval', kvstore='device', lr=0.001, lr_step='7', network='resnet', no_flip=False, no_shuffle=False, prefix='model/e2e', pretrained='model/resnet-101', pretrained_epoch=0, resume=False, root_path='/home/aritra/Downloads', work_load_list=None) INFO:root:{'ANCHOR_RATIOS': [0.5, 1, 2], 'ANCHOR_SCALES': [8, 16, 32], 'FIXED_PARAMS': ['conv0', 'stage1', 'gamma', 'beta'], 'FIXED_PARAMS_SHARED': ['conv0', 'stage1', 'stage2', 'stage3', 'gamma', 'beta'], 'IMAGE_STRIDE': 0, 'NUM_ANCHORS': 9, 'NUM_CLASSES': 21, 'PIXEL_MEANS': array([0, 0, 0]), 'RCNN_FEAT_STRIDE': 16, 'RPN_FEAT_STRIDE': 16, 'SCALES': [(600, 1000)], '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.7, 'RPN_POSITIVE_OVERLAP': 0.7, 'RPN_POSITIVE_WEIGHT': -1.0, 'RPN_POST_NMS_TOP_N': 2000, 'RPN_PRE_NMS_TOP_N': 12000}} INFO:root:voc_2007_trainval num_images 5011 INFO:root:voc_2007_trainval gt roidb loaded from /home/aritra/Downloads/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, 600, 1000)), ('gt_boxes', (1, 100, 5))] [('label', (1, 21546)), ('bbox_target', (1, 36, 38, 63)), ('bbox_weight', (1, 36, 38, 63))] INFO:root:output shape {'bbox_loss_reshape_output': (1, 128, 84), 'blockgrad0_output': (1, 128), 'cls_prob_reshape_output': (1, 128, 21), 'rpn_bbox_loss_output': (1, 36, 38, 50), 'rpn_cls_prob_output': (1, 2, 342, 50)} Traceback (most recent call last): File "train_end2end.py", line 178, in main() File "train_end2end.py", line 175, in main lr=args.lr, lr_step=args.lr_step) File "train_end2end.py", line 83, in train_net assert k in arg_params, k + ' not initialized' AssertionError: bn_data_gamma not initialized

ijkguo commented 6 years ago

This error message is a sanity check to the parameters. bn_data_gamma should be included in resnet-101-0000.params downloaded from mxnet model zoo. Please check the parameters yourself.