mmeval.utils.try_import¶
- mmeval.utils.try_import(name: str) → Optional[module][源代码]¶
Try to import a module.
- 参数
name (str) – Specifies what module to import in absolute or relative terms (e.g. either pkg.mod or ..mod).
- 返回
If importing successfully, returns the imported module, otherwise returns None.
- 返回类型
ModuleType or None