mmdetection–注册表的注册过程之HOOKS(一)

在’/mmcv/parallel/registry.py’中
MODULE_WRAPPERS = Registry('module wrapper')
MODULE_WRAPPERS.register_module(module=DataParallel)
MODULE_WRAPPERS.register_module(module=DistributedDataParallel)

首先实例化注册表HOOKS,然后再通过python装饰器函数,将类名和类添加到HOOKS._module_dict中,完成注册表的注册。 注册表HOOKS是在什么时候完成注册的呢, from .hooks import HOOKS, Hook->实例化注册表HOOKS from *** import ***->完成注册表HOOKS的注册
from .checkpoint import CheckpointHook
from .

mmdetection–注册表的注册过程之HOOKS(一)最先出现在Python成神之路

版权声明:
作者:Zad
链接:https://www.techfm.club/p/21377.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>