weixin_39679664
weixin_39679664
2020-12-02 00:32

请求指点IndexError: list index out of range

前辈您好,我在试着运行您代码时遇到如下问题: python -m torch.distributed.launch --nproc_per_node=1 tools/train_net.py --config-file configs/glide/dota.yaml 'Non-existent config key: INPUT.RANDOM_ROTATE_ON' 2020-04-08 19:59:03,540 maskrcnn_benchmark INFO: Using 1 GPUs 2020-04-08 19:59:03,540 maskrcnn_benchmark INFO: Namespace(config_file='configs/glide/dota.yaml', distributed=False, local_rank=0, opts=[], skip_test=False) 2020-04-08 19:59:03,540 maskrcnn_benchmark INFO: Collecting env info (might take some time) 2020-04-08 19:59:04,305 maskrcnn_benchmark INFO: PyTorch version: 1.4.0 Is debug build: No CUDA used to build PyTorch: 10.1

OS: Ubuntu 18.04.4 LTS GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 CMake version: Could not collect

Python version: 3.8 Is CUDA available: Yes CUDA runtime version: 10.1.243 GPU models and configuration: GPU 0: GeForce RTX 2070 with Max-Q Design Nvidia driver version: 440.59 cuDNN version: /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudnn.so.7

Versions of relevant libraries: [pip] numpy==1.18.1 [pip] torch==1.4.0 [pip] torchvision==0.5.0 [conda] blas 1.0 mkl https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main [conda] mkl 2020.0 166 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main [conda] mkl-service 2.3.0 py38he904b0f_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main [conda] mkl_fft 1.0.15 py38ha843d7b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main [conda] mkl_random 1.1.0 py38h962f231_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main [conda] pytorch 1.4.0 py3.8_cuda10.1.243_cudnn7.6.3_0 pytorch [conda] torchvision 0.5.0 py38_cu101 pytorch Pillow (7.0.0) 2020-04-08 19:59:04,305 maskrcnn_benchmark INFO: Loaded configuration file configs/glide/dota.yaml 2020-04-08 19:59:04,305 maskrcnn_benchmark INFO: OUTPUT_DIR: "exp_dota/dota" INPUT: MIN_SIZE_TRAIN: (1024,) MAX_SIZE_TRAIN: 1333 MIN_SIZE_TEST: 1024 MAX_SIZE_TEST: 1333 RANDOM_ROTATE_ON: True #(0, 90, 180, or 270) #false or true? BRIGHTNESS: 0. CONTRAST: 0. SATURATION: 0. HUE: 0. MODEL: META_ARCHITECTURE: "GeneralizedRCNN" RATIO_ON: True WEIGHT: "data/R-101.pkl" BACKBONE: CONV_BODY: "R-101-FPN" RESNETS: BACKBONE_OUT_CHANNELS: 256 RPN: USE_FPN: True ANCHOR_SIZES: (32, 64, 128, 256, 512) ANCHOR_STRIDE: (4, 8, 16, 32, 64) ASPECT_RATIOS: (0.5, 1.0, 2.0) PRE_NMS_TOP_N_TRAIN: 1200 PRE_NMS_TOP_N_TEST: 1200 FPN_POST_NMS_TOP_N_TRAIN: 1200 FPN_POST_NMS_TOP_N_TEST: 600 ROI_HEADS: USE_FPN: True BATCH_SIZE_PER_IMAGE: 512 POSITIVE_FRACTION: 0.25 DETECTIONS_PER_IMG: 2000 ROI_BOX_HEAD: POOLER_RESOLUTION: 7 POOLER_SCALES: (0.25, 0.125, 0.0625, 0.03125) POOLER_SAMPLING_RATIO: 2 FEATURE_EXTRACTOR: "FPN2MLPFeatureExtractor" PREDICTOR: "FPNRatioPredictor" NUM_CLASSES: 16 DATASETS: TRAIN: ("trainval_cut",) TEST: ("test_cut",) DATALOADER: SIZE_DIVISIBILITY: 32 SOLVER: BASE_LR: 0.0075 WEIGHT_DECAY: 0.0001 STEPS: (38000, 46000) MAX_ITER: 50000 IMS_PER_BATCH: 6 CHECKPOINT_START_STEP: 30000 TEST: IMS_PER_BATCH: 12

2020-04-08 19:59:04,306 maskrcnn_benchmark INFO: Running with config: AMP_VERBOSE: False DATALOADER: ASPECT_RATIO_GROUPING: True NUM_WORKERS: 4 SIZE_DIVISIBILITY: 0 DATASETS: TEST: () TRAIN: () DTYPE: float32 INPUT: BRIGHTNESS: 0.0 CONTRAST: 0.0 HORIZONTAL_FLIP_PROB_TRAIN: 0.5 HUE: 0.0 MAX_SIZE_TEST: 1333 MAX_SIZE_TRAIN: 1333 MIN_SIZE_TEST: 1024 MIN_SIZE_TRAIN: (1024,) PIXEL_MEAN: [102.9801, 115.9465, 122.7717] PIXEL_STD: [1.0, 1.0, 1.0] SATURATION: 0.0 TO_BGR255: True VERTICAL_FLIP_PROB_TRAIN: 0.0 MODEL: BACKBONE: CONV_BODY: R-50-C4 FREEZE_CONV_BODY_AT: 2 CLS_AGNOSTIC_BBOX_REG: False DEVICE: cuda FBNET: ARCH: default ARCH_DEF: BN_TYPE: bn DET_HEAD_BLOCKS: [] DET_HEAD_LAST_SCALE: 1.0 DET_HEAD_STRIDE: 0 DW_CONV_SKIP_BN: True DW_CONV_SKIP_RELU: True KPTS_HEAD_BLOCKS: [] KPTS_HEAD_LAST_SCALE: 0.0 KPTS_HEAD_STRIDE: 0 MASK_HEAD_BLOCKS: [] MASK_HEAD_LAST_SCALE: 0.0 MASK_HEAD_STRIDE: 0 RPN_BN_TYPE: RPN_HEAD_BLOCKS: 0 SCALE_FACTOR: 1.0 WIDTH_DIVISOR: 1 FPN: USE_GN: False USE_RELU: False GROUP_NORM: DIM_PER_GP: -1 EPSILON: 1e-05 NUM_GROUPS: 32 KEYPOINT_ON: False MASK_ON: False META_ARCHITECTURE: GeneralizedRCNN RESNETS: BACKBONE_OUT_CHANNELS: 1024 DEFORMABLE_GROUPS: 1 NUM_GROUPS: 1 RES2_OUT_CHANNELS: 256 RES5_DILATION: 1 STAGE_WITH_DCN: (False, False, False, False) STEM_FUNC: StemWithFixedBatchNorm STEM_OUT_CHANNELS: 64 STRIDE_IN_1X1: True TRANS_FUNC: BottleneckWithFixedBatchNorm WIDTH_PER_GROUP: 64 WITH_MODULATED_DCN: False RETINANET: ANCHOR_SIZES: (32, 64, 128, 256, 512) ANCHOR_STRIDES: (8, 16, 32, 64, 128) ASPECT_RATIOS: (0.5, 1.0, 2.0) BBOX_REG_BETA: 0.11 BBOX_REG_WEIGHT: 4.0 BG_IOU_THRESHOLD: 0.4 FG_IOU_THRESHOLD: 0.5 INFERENCE_TH: 0.05 LOSS_ALPHA: 0.25 LOSS_GAMMA: 2.0 NMS_TH: 0.4 NUM_CLASSES: 81 NUM_CONVS: 4 OCTAVE: 2.0 PRE_NMS_TOP_N: 1000 PRIOR_PROB: 0.01 SCALES_PER_OCTAVE: 3 STRADDLE_THRESH: 0 USE_C5: True RETINANET_ON: False ROI_BOX_HEAD: CONV_HEAD_DIM: 256 DILATION: 1 FEATURE_EXTRACTOR: ResNet50Conv5ROIFeatureExtractor MLP_HEAD_DIM: 1024 NUM_CLASSES: 81 NUM_STACKED_CONVS: 4 POOLER_RESOLUTION: 14 POOLER_SAMPLING_RATIO: 0 POOLER_SCALES: (0.0625,) PREDICTOR: FastRCNNPredictor USE_GN: False ROI_HEADS: BATCH_SIZE_PER_IMAGE: 512 BBOX_REG_WEIGHTS: (10.0, 10.0, 5.0, 5.0) BG_IOU_THRESHOLD: 0.5 DETECTIONS_PER_IMG: 100 FG_IOU_THRESHOLD: 0.5 NMS: 0.5 POSITIVE_FRACTION: 0.25 SCORE_THRESH: 0.05 USE_FPN: False ROI_KEYPOINT_HEAD: CONV_LAYERS: (512, 512, 512, 512, 512, 512, 512, 512) FEATURE_EXTRACTOR: KeypointRCNNFeatureExtractor MLP_HEAD_DIM: 1024 NUM_CLASSES: 17 POOLER_RESOLUTION: 14 POOLER_SAMPLING_RATIO: 0 POOLER_SCALES: (0.0625,) PREDICTOR: KeypointRCNNPredictor RESOLUTION: 14 SHARE_BOX_FEATURE_EXTRACTOR: True ROI_MASK_HEAD: CONV_LAYERS: (256, 256, 256, 256) DILATION: 1 FEATURE_EXTRACTOR: ResNet50Conv5ROIFeatureExtractor MLP_HEAD_DIM: 1024 POOLER_RESOLUTION: 14 POOLER_SAMPLING_RATIO: 0 POOLER_SCALES: (0.0625,) POSTPROCESS_MASKS: False POSTPROCESS_MASKS_THRESHOLD: 0.5 PREDICTOR: MaskRCNNC4Predictor RESOLUTION: 14 SHARE_BOX_FEATURE_EXTRACTOR: True USE_GN: False RPN: ANCHOR_SIZES: (32, 64, 128, 256, 512) ANCHOR_STRIDE: (16,) ASPECT_RATIOS: (0.5, 1.0, 2.0) BATCH_SIZE_PER_IMAGE: 256 BG_IOU_THRESHOLD: 0.3 FG_IOU_THRESHOLD: 0.7 FPN_POST_NMS_PER_BATCH: True FPN_POST_NMS_TOP_N_TEST: 2000 FPN_POST_NMS_TOP_N_TRAIN: 2000 MIN_SIZE: 0 NMS_THRESH: 0.7 POSITIVE_FRACTION: 0.5 POST_NMS_TOP_N_TEST: 1000 POST_NMS_TOP_N_TRAIN: 2000 PRE_NMS_TOP_N_TEST: 6000 PRE_NMS_TOP_N_TRAIN: 12000 RPN_HEAD: SingleConvRPNHead STRADDLE_THRESH: 0 USE_FPN: False RPN_ONLY: False WEIGHT: OUTPUT_DIR: exp_dota/dota PATHS_CATALOG: /home/neo/桌面/gliding_vertex-master/maskrcnn-benchmark/maskrcnn_benchmark/config/paths_catalog.py SOLVER: BASE_LR: 0.001 BIAS_LR_FACTOR: 2 CHECKPOINT_PERIOD: 2500 GAMMA: 0.1 IMS_PER_BATCH: 16 MAX_ITER: 40000 MOMENTUM: 0.9 STEPS: (30000,) TEST_PERIOD: 0 WARMUP_FACTOR: 0.3333333333333333 WARMUP_ITERS: 500 WARMUP_METHOD: linear WEIGHT_DECAY: 0.0005 WEIGHT_DECAY_BIAS: 0 TEST: BBOX_AUG: ENABLED: False H_FLIP: False MAX_SIZE: 4000 SCALES: () SCALE_H_FLIP: False DETECTIONS_PER_IMG: 100 EXPECTED_RESULTS: [] EXPECTED_RESULTS_SIGMA_TOL: 4 IMS_PER_BATCH: 8 2020-04-08 19:59:04,306 maskrcnn_benchmark INFO: Saving config into: exp_dota/dota/config.yml Selected optimization level O0: Pure FP32 training.

Defaults for this optimization level are: enabled : True opt_level : O0 cast_model_type : torch.float32 patch_torch_functions : False keep_batchnorm_fp32 : None master_weights : False loss_scale : 1.0 Processing user overrides (additional kwargs that are not None)... After processing overrides, optimization options are: enabled : True opt_level : O0 cast_model_type : torch.float32 patch_torch_functions : False keep_batchnorm_fp32 : None master_weights : False loss_scale : 1.0 2020-04-08 19:59:06,111 maskrcnn_benchmark.utils.checkpoint INFO: No checkpoint found. Initializing model from scratch 2020-04-08 19:59:06,111 maskrcnn_benchmark.data.build WARNING: When using more than one image per GPU you may encounter an out-of-memory (OOM) error if your GPU does not have sufficient memory. If this happens, you can reduce SOLVER.IMS_PER_BATCH (for training) or TEST.IMS_PER_BATCH (for inference). For training, you must also adjust the learning rate and schedule length according to the linear scaling rule. See for example: https://github.com/facebookresearch/Detectron/blob/master/configs/getting_started/tutorial_1gpu_e2e_faster_rcnn_R-50-FPN.yaml#L14 Traceback (most recent call last): File "tools/train_net.py", line 209, in main() File "tools/train_net.py", line 202, in main model = train(cfg, args.local_rank, args.distributed) File "tools/train_net.py", line 77, in train data_loader = make_data_loader( File "/home/neo/桌面/gliding_vertex-master/maskrcnn-benchmark/maskrcnn_benchmark/data/build.py", line 156, in make_data_loader datasets = build_dataset(dataset_list, transforms, DatasetCatalog, is_train or is_for_period) File "/home/neo/桌面/gliding_vertex-master/maskrcnn-benchmark/maskrcnn_benchmark/data/build.py", line 53, in build_dataset dataset = datasets[0] IndexError: list index out of range Traceback (most recent call last): File "/home/neo/anaconda3/envs/maskrcnn/lib/python3.8/runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/neo/anaconda3/envs/maskrcnn/lib/python3.8/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/neo/anaconda3/envs/maskrcnn/lib/python3.8/site-packages/torch/distributed/launch.py", line 263, in main() File "/home/neo/anaconda3/envs/maskrcnn/lib/python3.8/site-packages/torch/distributed/launch.py", line 258, in main raise subprocess.CalledProcessError(returncode=process.returncode, subprocess.CalledProcessError: Command '['/home/neo/anaconda3/envs/maskrcnn/bin/python', '-u', 'tools/train_net.py', '--local_rank=0', '--config-file', 'configs/glide/dota.yaml']' returned non-zero exit status 1.

该提问来源于开源项目:MingtaoFu/gliding_vertex

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

9条回答