Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- C:\SOLO-master>call activate solov2_2
- C:\SOLO-master>conda.bat activate solov2_2
- (solov2_2) C:\SOLO-master>pip list
- Package Version Location
- ------------------ ------------------- --------------
- addict 2.4.0
- certifi 2021.5.30
- charset-normalizer 2.0.4
- cycler 0.10.0
- Cython 0.29.24
- idna 3.2
- kiwisolver 1.3.2
- matplotlib 3.4.3
- mmcv 0.2.16
- mmdet 1.0.0+unknown c:\solo-master
- numpy 1.21.2
- olefile 0.46
- opencv-python 4.5.3.56
- Pillow 6.2.2
- pip 21.0.1
- pycocotools 2.0
- pyparsing 2.4.7
- python-dateutil 2.8.2
- PyYAML 5.4.1
- requests 2.26.0
- scipy 1.7.1
- setuptools 52.0.0.post20210125
- six 1.16.0
- terminaltables 3.1.0
- torch 1.10.0.dev20210904
- torchvision 0.11.0.dev20210904
- typing-extensions 3.10.0.0
- urllib3 1.26.6
- wheel 0.37.0
- wincertstore 0.2
- (solov2_2) C:\SOLO-master>python tools/train.py configs/solov2/solov2_r50_fpn_8gpu_3x.py
- 2021-09-04 15:18:39,590 - mmdet - INFO - Distributed training: False
- 2021-09-04 15:18:39,590 - mmdet - INFO - MMDetection Version: 1.0.0+unknown
- 2021-09-04 15:18:39,591 - mmdet - INFO - Config:
- # model settings
- model = dict(
- type='SOLOv2',
- pretrained='torchvision://resnet50',
- backbone=dict(
- type='ResNet',
- depth=50,
- num_stages=4,
- out_indices=(0, 1, 2, 3), # C2, C3, C4, C5
- frozen_stages=1,
- style='pytorch'),
- neck=dict(
- type='FPN',
- in_channels=[256, 512, 1024, 2048],
- out_channels=256,
- start_level=0,
- num_outs=5),
- bbox_head=dict(
- type='SOLOv2Head',
- num_classes=81,
- in_channels=256,
- stacked_convs=4,
- seg_feat_channels=512,
- strides=[8, 8, 16, 32, 32],
- scale_ranges=((1, 96), (48, 192), (96, 384), (192, 768), (384, 2048)),
- sigma=0.2,
- num_grids=[40, 36, 24, 16, 12],
- ins_out_channels=256,
- loss_ins=dict(
- type='DiceLoss',
- use_sigmoid=True,
- loss_weight=3.0),
- loss_cate=dict(
- type='FocalLoss',
- use_sigmoid=True,
- gamma=2.0,
- alpha=0.25,
- loss_weight=1.0)),
- mask_feat_head=dict(
- type='MaskFeatHead',
- in_channels=256,
- out_channels=128,
- start_level=0,
- end_level=3,
- num_classes=256,
- norm_cfg=dict(type='GN', num_groups=32, requires_grad=True)),
- )
- # training and testing settings
- train_cfg = dict()
- test_cfg = dict(
- nms_pre=500,
- score_thr=0.1,
- mask_thr=0.5,
- update_thr=0.05,
- kernel='gaussian', # gaussian/linear
- sigma=2.0,
- max_per_img=100)
- # dataset settings
- dataset_type = 'CocoDataset'
- data_root = 'data/coco/'
- img_norm_cfg = dict(
- mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
- train_pipeline = [
- dict(type='LoadImageFromFile'),
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
- dict(type='Resize',
- img_scale=[(1333, 800), (1333, 768), (1333, 736),
- (1333, 704), (1333, 672), (1333, 640)],
- multiscale_mode='value',
- keep_ratio=True),
- dict(type='RandomFlip', flip_ratio=0.5),
- dict(type='Normalize', **img_norm_cfg),
- dict(type='Pad', size_divisor=32),
- dict(type='DefaultFormatBundle'),
- dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),
- ]
- test_pipeline = [
- dict(type='LoadImageFromFile'),
- dict(
- type='MultiScaleFlipAug',
- img_scale=(1333, 800),
- flip=False,
- transforms=[
- dict(type='Resize', keep_ratio=True),
- dict(type='RandomFlip'),
- dict(type='Normalize', **img_norm_cfg),
- dict(type='Pad', size_divisor=32),
- dict(type='ImageToTensor', keys=['img']),
- dict(type='Collect', keys=['img']),
- ])
- ]
- data = dict(
- imgs_per_gpu=2,
- workers_per_gpu=2,
- train=dict(
- type=dataset_type,
- ann_file=data_root + 'annotations/instances_train2017.json',
- img_prefix=data_root + 'train2017/',
- pipeline=train_pipeline),
- val=dict(
- type=dataset_type,
- ann_file=data_root + 'annotations/instances_val2017.json',
- img_prefix=data_root + 'val2017/',
- pipeline=test_pipeline),
- test=dict(
- type=dataset_type,
- ann_file=data_root + 'annotations/instances_val2017.json',
- img_prefix=data_root + 'val2017/',
- pipeline=test_pipeline))
- # optimizer
- optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0001)
- optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
- # learning policy
- lr_config = dict(
- policy='step',
- warmup='linear',
- warmup_iters=500,
- warmup_ratio=0.01,
- step=[27, 33])
- checkpoint_config = dict(interval=1)
- # yapf:disable
- log_config = dict(
- interval=50,
- hooks=[
- dict(type='TextLoggerHook'),
- # dict(type='TensorboardLoggerHook')
- ])
- # yapf:enable
- # runtime settings
- total_epochs = 36
- device_ids = range(8)
- dist_params = dict(backend='nccl')
- log_level = 'INFO'
- work_dir = './work_dirs/solov2_release_r50_fpn_8gpu_3x'
- load_from = None
- resume_from = None
- workflow = [('train', 1)]
- 2021-09-04 15:18:39,821 - mmdet - INFO - load model from: torchvision://resnet50
- 2021-09-04 15:18:39,872 - mmdet - WARNING - The model and loaded state dict do not match exactly
- unexpected key in source state_dict: fc.weight, fc.bias
- loading annotations into memory...
- Done (t=0.03s)
- creating index...
- index created!
- 2021-09-04 15:18:40,145 - mmdet - INFO - Start running, host: MASTER@DESKTOP-9AP1OFR, work_dir: C:\SOLO-master\work_dirs\solov2_release_r50_fpn_8gpu_3x
- 2021-09-04 15:18:40,146 - mmdet - INFO - workflow: [('train', 1)], max: 36 epochs
- C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\torch\nn\functional.py:3635: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
- "See the documentation of nn.Upsample for details.".format(mode)
- C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\torch\nn\functional.py:3680: UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries, and now uses scale_factor directly, instead of relying on the computed output size. If you wish to restore the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details.
- "The default behavior for interpolate/upsample with float scale_factor changed "
- c:\solo-master\mmdet\models\anchor_heads\solov2_head.py:322: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
- coord_w = int((center_w / upsampled_size[1]) // (1. / num_grid))
- c:\solo-master\mmdet\models\anchor_heads\solov2_head.py:323: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
- coord_h = int((center_h / upsampled_size[0]) // (1. / num_grid))
- c:\solo-master\mmdet\models\anchor_heads\solov2_head.py:326: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
- top_box = max(0, int(((center_h - half_h) / upsampled_size[0]) // (1. / num_grid)))
- c:\solo-master\mmdet\models\anchor_heads\solov2_head.py:327: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
- down_box = min(num_grid - 1, int(((center_h + half_h) / upsampled_size[0]) // (1. / num_grid)))
- c:\solo-master\mmdet\models\anchor_heads\solov2_head.py:328: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
- left_box = max(0, int(((center_w - half_w) / upsampled_size[1]) // (1. / num_grid)))
- c:\solo-master\mmdet\models\anchor_heads\solov2_head.py:329: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
- right_box = min(num_grid - 1, int(((center_w + half_w) / upsampled_size[1]) // (1. / num_grid)))
- Traceback (most recent call last):
- File "tools/train.py", line 125, in <module>
- main()
- File "tools/train.py", line 121, in main
- timestamp=timestamp)
- File "c:\solo-master\mmdet\apis\train.py", line 111, in train_detector
- timestamp=timestamp)
- File "c:\solo-master\mmdet\apis\train.py", line 297, in _non_dist_train
- runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
- File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\mmcv\runner\runner.py", line 364, in run
- epoch_runner(data_loaders[i], **kwargs)
- File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\mmcv\runner\runner.py", line 275, in train
- self.call_hook('after_train_iter')
- File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\mmcv\runner\runner.py", line 231, in call_hook
- getattr(hook, fn_name)(self)
- File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\mmcv\runner\hooks\optimizer.py", line 18, in after_train_iter
- runner.outputs['loss'].backward()
- File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\torch\_tensor.py", line 306, in backward
- torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
- File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\torch\autograd\__init__.py", line 156, in backward
- allow_unreachable=True, accumulate_grad=True) # allow_unreachable flag
- RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [2, 128, 232, 160]], which is output 0 of ReluBackward, is at version 3; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
- (solov2_2) C:\SOLO-master>pause
- Appuyez sur une touche pour continuer...
Advertisement
RAW Paste Data
Copied
Advertisement