Swin-Transformer-Object-Detection 訓練
以下是使用Swin Transformer Object Detection 訓練自己的資料集可能發生的問題
在single gpu 可能發生的問題:
apex可能會無法正常運作,以cascade_mask_rcnn_swin_tiny_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_1x_coco.py為例
須將runner = dict(type='EpochBasedRunnerAmp', max_epochs=12)修改為EpochBasedRunner
並且將
optimizer_config = dict(
type="DistOptimizerHook",
update_interval=1,
grad_clip=None,
coalesce=True,
bucket_size_mb=-1,
use_fp16=True,
)
comment起來
再來norm_cfg=dict(type='SyncBN', requires_grad=True),須將SyncBN替換為BN
留言
張貼留言