Shortcuts

default_runtime 源代码

# Copyright (c) OpenMMLab. All rights reserved.
from mmengine.hooks import (CheckpointHook, DistSamplerSeedHook, LoggerHook,
                            ParamSchedulerHook)
from mmengine.visualization import LocalVisBackend

from mmagic.engine import BasicVisualizationHook, IterTimerHook, LogProcessor
from mmagic.visualization import ConcatImageVisualizer

[文档]default_scope = 'mmagic'
[文档]save_dir = './work_dirs'
[文档]default_hooks = dict( timer=dict(type=IterTimerHook), logger=dict(type=LoggerHook, interval=100), param_scheduler=dict(type=ParamSchedulerHook), checkpoint=dict( type=CheckpointHook, interval=5000, out_dir=save_dir, by_epoch=False, max_keep_ckpts=10, save_best='PSNR', rule='greater', ), sampler_seed=dict(type=DistSamplerSeedHook),
)
[文档]env_cfg = dict( cudnn_benchmark=False, mp_cfg=dict(mp_start_method='fork', opencv_num_threads=4), dist_cfg=dict(backend='nccl'),
)
[文档]log_level = 'INFO'
[文档]log_processor = dict(type=LogProcessor, window_size=100, by_epoch=False)
[文档]load_from = None
[文档]resume = False
[文档]vis_backends = [dict(type=LocalVisBackend)]
[文档]visualizer = dict( type=ConcatImageVisualizer, vis_backends=vis_backends, fn_key='gt_path', img_keys=['gt_img', 'input', 'pred_img'], bgr2rgb=True)
[文档]custom_hooks = [dict(type=BasicVisualizationHook, interval=1)]
Read the Docs v: latest
Versions
latest
stable
0.x
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.