Advertisement
Guest User

Untitled

a guest
Sep 4th, 2021
29
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. C:\SOLO-master>call activate solov2_2
  3.  
  4. C:\SOLO-master>conda.bat activate solov2_2
  5.  
  6. (solov2_2) C:\SOLO-master>pip list
  7. Package Version Location
  8. ------------------ ------------------- --------------
  9. addict 2.4.0
  10. certifi 2021.5.30
  11. charset-normalizer 2.0.4
  12. cycler 0.10.0
  13. Cython 0.29.24
  14. idna 3.2
  15. kiwisolver 1.3.2
  16. matplotlib 3.4.3
  17. mmcv 0.2.16
  18. mmdet 1.0.0+unknown c:\solo-master
  19. numpy 1.21.2
  20. olefile 0.46
  21. opencv-python 4.5.3.56
  22. Pillow 6.2.2
  23. pip 21.0.1
  24. pycocotools 2.0
  25. pyparsing 2.4.7
  26. python-dateutil 2.8.2
  27. PyYAML 5.4.1
  28. requests 2.26.0
  29. scipy 1.7.1
  30. setuptools 52.0.0.post20210125
  31. six 1.16.0
  32. terminaltables 3.1.0
  33. torch 1.10.0.dev20210904
  34. torchvision 0.11.0.dev20210904
  35. typing-extensions 3.10.0.0
  36. urllib3 1.26.6
  37. wheel 0.37.0
  38. wincertstore 0.2
  39.  
  40. (solov2_2) C:\SOLO-master>python tools/train.py configs/solov2/solov2_r50_fpn_8gpu_3x.py
  41. 2021-09-04 15:18:39,590 - mmdet - INFO - Distributed training: False
  42. 2021-09-04 15:18:39,590 - mmdet - INFO - MMDetection Version: 1.0.0+unknown
  43. 2021-09-04 15:18:39,591 - mmdet - INFO - Config:
  44. # model settings
  45. model = dict(
  46. type='SOLOv2',
  47. pretrained='torchvision://resnet50',
  48. backbone=dict(
  49. type='ResNet',
  50. depth=50,
  51. num_stages=4,
  52. out_indices=(0, 1, 2, 3), # C2, C3, C4, C5
  53. frozen_stages=1,
  54. style='pytorch'),
  55. neck=dict(
  56. type='FPN',
  57. in_channels=[256, 512, 1024, 2048],
  58. out_channels=256,
  59. start_level=0,
  60. num_outs=5),
  61. bbox_head=dict(
  62. type='SOLOv2Head',
  63. num_classes=81,
  64. in_channels=256,
  65. stacked_convs=4,
  66. seg_feat_channels=512,
  67. strides=[8, 8, 16, 32, 32],
  68. scale_ranges=((1, 96), (48, 192), (96, 384), (192, 768), (384, 2048)),
  69. sigma=0.2,
  70. num_grids=[40, 36, 24, 16, 12],
  71. ins_out_channels=256,
  72. loss_ins=dict(
  73. type='DiceLoss',
  74. use_sigmoid=True,
  75. loss_weight=3.0),
  76. loss_cate=dict(
  77. type='FocalLoss',
  78. use_sigmoid=True,
  79. gamma=2.0,
  80. alpha=0.25,
  81. loss_weight=1.0)),
  82. mask_feat_head=dict(
  83. type='MaskFeatHead',
  84. in_channels=256,
  85. out_channels=128,
  86. start_level=0,
  87. end_level=3,
  88. num_classes=256,
  89. norm_cfg=dict(type='GN', num_groups=32, requires_grad=True)),
  90. )
  91. # training and testing settings
  92. train_cfg = dict()
  93. test_cfg = dict(
  94. nms_pre=500,
  95. score_thr=0.1,
  96. mask_thr=0.5,
  97. update_thr=0.05,
  98. kernel='gaussian', # gaussian/linear
  99. sigma=2.0,
  100. max_per_img=100)
  101. # dataset settings
  102. dataset_type = 'CocoDataset'
  103. data_root = 'data/coco/'
  104. img_norm_cfg = dict(
  105. mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
  106. train_pipeline = [
  107. dict(type='LoadImageFromFile'),
  108. dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
  109. dict(type='Resize',
  110. img_scale=[(1333, 800), (1333, 768), (1333, 736),
  111. (1333, 704), (1333, 672), (1333, 640)],
  112. multiscale_mode='value',
  113. keep_ratio=True),
  114. dict(type='RandomFlip', flip_ratio=0.5),
  115. dict(type='Normalize', **img_norm_cfg),
  116. dict(type='Pad', size_divisor=32),
  117. dict(type='DefaultFormatBundle'),
  118. dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),
  119. ]
  120. test_pipeline = [
  121. dict(type='LoadImageFromFile'),
  122. dict(
  123. type='MultiScaleFlipAug',
  124. img_scale=(1333, 800),
  125. flip=False,
  126. transforms=[
  127. dict(type='Resize', keep_ratio=True),
  128. dict(type='RandomFlip'),
  129. dict(type='Normalize', **img_norm_cfg),
  130. dict(type='Pad', size_divisor=32),
  131. dict(type='ImageToTensor', keys=['img']),
  132. dict(type='Collect', keys=['img']),
  133. ])
  134. ]
  135. data = dict(
  136. imgs_per_gpu=2,
  137. workers_per_gpu=2,
  138. train=dict(
  139. type=dataset_type,
  140. ann_file=data_root + 'annotations/instances_train2017.json',
  141. img_prefix=data_root + 'train2017/',
  142. pipeline=train_pipeline),
  143. val=dict(
  144. type=dataset_type,
  145. ann_file=data_root + 'annotations/instances_val2017.json',
  146. img_prefix=data_root + 'val2017/',
  147. pipeline=test_pipeline),
  148. test=dict(
  149. type=dataset_type,
  150. ann_file=data_root + 'annotations/instances_val2017.json',
  151. img_prefix=data_root + 'val2017/',
  152. pipeline=test_pipeline))
  153. # optimizer
  154. optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0001)
  155. optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
  156. # learning policy
  157. lr_config = dict(
  158. policy='step',
  159. warmup='linear',
  160. warmup_iters=500,
  161. warmup_ratio=0.01,
  162. step=[27, 33])
  163. checkpoint_config = dict(interval=1)
  164. # yapf:disable
  165. log_config = dict(
  166. interval=50,
  167. hooks=[
  168. dict(type='TextLoggerHook'),
  169. # dict(type='TensorboardLoggerHook')
  170. ])
  171. # yapf:enable
  172. # runtime settings
  173. total_epochs = 36
  174. device_ids = range(8)
  175. dist_params = dict(backend='nccl')
  176. log_level = 'INFO'
  177. work_dir = './work_dirs/solov2_release_r50_fpn_8gpu_3x'
  178. load_from = None
  179. resume_from = None
  180. workflow = [('train', 1)]
  181.  
  182. 2021-09-04 15:18:39,821 - mmdet - INFO - load model from: torchvision://resnet50
  183. 2021-09-04 15:18:39,872 - mmdet - WARNING - The model and loaded state dict do not match exactly
  184.  
  185. unexpected key in source state_dict: fc.weight, fc.bias
  186.  
  187. loading annotations into memory...
  188. Done (t=0.03s)
  189. creating index...
  190. index created!
  191. 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
  192. 2021-09-04 15:18:40,146 - mmdet - INFO - workflow: [('train', 1)], max: 36 epochs
  193. 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.
  194. "See the documentation of nn.Upsample for details.".format(mode)
  195. 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.
  196. "The default behavior for interpolate/upsample with float scale_factor changed "
  197. 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').
  198. coord_w = int((center_w / upsampled_size[1]) // (1. / num_grid))
  199. 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').
  200. coord_h = int((center_h / upsampled_size[0]) // (1. / num_grid))
  201. 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').
  202. top_box = max(0, int(((center_h - half_h) / upsampled_size[0]) // (1. / num_grid)))
  203. 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').
  204. down_box = min(num_grid - 1, int(((center_h + half_h) / upsampled_size[0]) // (1. / num_grid)))
  205. 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').
  206. left_box = max(0, int(((center_w - half_w) / upsampled_size[1]) // (1. / num_grid)))
  207. 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').
  208. right_box = min(num_grid - 1, int(((center_w + half_w) / upsampled_size[1]) // (1. / num_grid)))
  209. Traceback (most recent call last):
  210. File "tools/train.py", line 125, in <module>
  211. main()
  212. File "tools/train.py", line 121, in main
  213. timestamp=timestamp)
  214. File "c:\solo-master\mmdet\apis\train.py", line 111, in train_detector
  215. timestamp=timestamp)
  216. File "c:\solo-master\mmdet\apis\train.py", line 297, in _non_dist_train
  217. runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
  218. File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\mmcv\runner\runner.py", line 364, in run
  219. epoch_runner(data_loaders[i], **kwargs)
  220. File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\mmcv\runner\runner.py", line 275, in train
  221. self.call_hook('after_train_iter')
  222. File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\mmcv\runner\runner.py", line 231, in call_hook
  223. getattr(hook, fn_name)(self)
  224. File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\mmcv\runner\hooks\optimizer.py", line 18, in after_train_iter
  225. runner.outputs['loss'].backward()
  226. File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\torch\_tensor.py", line 306, in backward
  227. torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
  228. File "C:\Users\MASTER\.conda\envs\solov2_2\lib\site-packages\torch\autograd\__init__.py", line 156, in backward
  229. allow_unreachable=True, accumulate_grad=True) # allow_unreachable flag
  230. 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).
  231.  
  232. (solov2_2) C:\SOLO-master>pause
  233. Appuyez sur une touche pour continuer...
Advertisement
RAW Paste Data Copied
Advertisement