default_runtime.py 代码注释
default_runtime.py 代码注释
checkpoint_config = dict(interval=1)
# yapf:disable
#要不要用日志log
log_config = dict(
interval=50,
hooks=[
dict(type='TextLoggerHook'),#在控制台打印信息
# dict(type='TensorboardLoggerHook')#开启Tensorboard
#支持wandb,想了解的话自己去搜一下怎么用
])
# yapf:enable
custom_hooks = [dict(type='NumClassCheckHook')]
dist_params = dict(backend='nccl')#和分布式训练相关,一般来说不需要董
log_level = 'INFO'
# load_from = None #模型要不要加载预训练权重路径
load_from = r"F:\git\Swin-Transformer\mmdetection\mask_rcnn_swin-t-p4-w7_fpn_ms-crop-3x_coco_20210906_131725-bacf6f7b.pth"
# load_from = r"F:\git\Swin-Transformer\mmdetection\mask_rcnn_swin_tiny_patch4_window7.pth"
resume_from = None #训练中断的话指定以下新的resume,resume的话就不可以中途改参数了
workflow = [('train', 1)]
# disable opencv multithreading to avoid system being overloaded
opencv_num_threads = 0
# set multi-process start method as `fork` to speed up the training
mp_start_method = 'fork'
# Default setting for scaling LR automatically
# - `enable` means enable scaling LR automatically
# or not by default.
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
#自动的去对学习率处理,默认是单卡,看一下上方的英文注释
auto_scale_lr = dict(enable=False, base_batch_size=32)