22
33## 引言
44
5- 本指南介绍了 MMSegmentation 0.x 和 MMSegmentation1.x 在行为和 API 方面的基本区别,以及这些如何都与您的迁移过程相关 。
5+ 本指南介绍了 MMSegmentation 0.x 和 MMSegmentation1.x 在表现和 API 方面的基本区别,以及这些与迁移过程的关系 。
66
77## 新的依赖
88
@@ -46,7 +46,7 @@ OpenMMLab 2.0 的主要改进是发布了 MMEngine,它为启动训练任务的
4646<td >--resume='auto'</td >
4747</tr >
4848<tr >
49- <td >培训练期间是否不评估检查点 </td >
49+ <td >训练期间是否不评估检查点 </td >
5050<td >--no-validate</td >
5151<td >--cfg-options val_cfg=None val_dataloader=None val_evaluator=None</td >
5252</tr >
@@ -102,11 +102,11 @@ OpenMMLab 2.0 的主要改进是发布了 MMEngine,它为启动训练任务的
102102
103103- ` mean ` (Sequence,可选):R、G、B 通道的像素平均值。默认为 None。
104104
105- - ` std ` (Sequence,可选):R、G、B通道的像素标准差 。默认为 None。
105+ - ` std ` (Sequence,可选):R、G、B 通道的像素标准差 。默认为 None。
106106
107107- ` size ` (Sequence,可选):固定的填充大小。
108108
109- - ` size_divisor ` (int,可选):填充大小的除法因子 。
109+ - ` size_divisor ` (int,可选):填充图像可以被当前值整除 。
110110
111111- ` seg_pad_val ` (float,可选):分割图的填充值。默认值:255。
112112
@@ -154,14 +154,14 @@ train_dataloader = dict(
154154 batch_size = 4 ,
155155 num_workers = 4 ,
156156 dataset = dict (... ),
157- sampler = dict (type = ' DefaultSampler' , shuffle = True ) # necessary
157+ sampler = dict (type = ' DefaultSampler' , shuffle = True ) # 必须
158158)
159159
160160val_dataloader = dict (
161161 batch_size = 4 ,
162162 num_workers = 4 ,
163163 dataset = dict (... ),
164- sampler = dict (type = ' DefaultSampler' , shuffle = False ) # necessary
164+ sampler = dict (type = ' DefaultSampler' , shuffle = False ) # 必须
165165)
166166
167167test_dataloader = val_dataloader
@@ -417,10 +417,10 @@ runner = dict(type='IterBasedRunner', max_iters=20000)
417417<td >
418418
419419``` python
420- # The `val_interval` is the original `evaluation.interval`.
420+ # `val_interval` 是旧版本的 `evaluation.interval`。
421421train_cfg = dict (type = ' IterBasedTrainLoop' , max_iters = 20000 , val_interval = 2000 )
422- val_cfg = dict (type = ' ValLoop' ) # Use the default validation loop.
423- test_cfg = dict (type = ' TestLoop' ) # Use the default test loop.
422+ val_cfg = dict (type = ' ValLoop' ) # 使用默认的验证循环。
423+ test_cfg = dict (type = ' TestLoop' ) # 使用默认的测试循环。
424424```
425425
426426</td >
@@ -438,22 +438,22 @@ test_cfg = dict(type='TestLoop') # Use the default test loop.
438438
439439``` python
440440default_hooks = dict (
441- # record the time of every iterations.
441+ # 记录每次迭代的时间。
442442 timer = dict (type = ' IterTimerHook' ),
443443
444- # print log every 50 iterations.
444+ # 每50次迭代打印一次日志。
445445 logger = dict (type = ' LoggerHook' , interval = 50 , log_metric_by_epoch = False ),
446446
447- # enable the parameter scheduler.
447+ # 启用参数调度程序。
448448 param_scheduler = dict (type = ' ParamSchedulerHook' ),
449449
450- # save checkpoint every 2000 iterations.
450+ # 每2000次迭代保存一次检查点。
451451 checkpoint = dict (type = ' CheckpointHook' , by_epoch = False , interval = 2000 ),
452452
453- # set sampler seed in distributed environment.
453+ # 在分布式环境中设置采样器种子。
454454 sampler_seed = dict (type = ' DistSamplerSeedHook' ),
455455
456- # validation results visualization.
456+ # 验证结果可视化。
457457 visualization = dict (type = ' SegVisualizationHook' ))
458458```
459459
@@ -505,13 +505,13 @@ visualizer = dict(
505505
506506``` python
507507env_cfg = dict (
508- # whether to enable cudnn benchmark
508+ # 是否启用 cudnn_benchmark
509509 cudnn_benchmark = False ,
510510
511- # set multi process parameters
511+ # 设置多进程参数
512512 mp_cfg = dict (mp_start_method = ' fork' , opencv_num_threads = 0 ),
513513
514- # set distributed parameters
514+ # 设置分布式参数
515515 dist_cfg = dict (backend = ' nccl' ),
516516)
517517```
0 commit comments