pyiqa.utils.registry ==================== .. py:module:: pyiqa.utils.registry Module Contents --------------- .. py:class:: Registry(name) The registry that provides name -> object mapping, to support third-party users' custom modules. To create a registry (e.g. a backbone registry): .. code-block:: python BACKBONE_REGISTRY = Registry('BACKBONE') To register an object: .. code-block:: python @BACKBONE_REGISTRY.register() class MyBackbone(): ... Or: .. code-block:: python BACKBONE_REGISTRY.register(MyBackbone) .. py:method:: register(obj=None) Register the given object under the the name `obj.__name__`. Can be used as either a decorator or not. See docstring of this class for usage. .. py:method:: get(name) .. py:method:: keys() .. py:data:: DATASET_REGISTRY .. py:data:: ARCH_REGISTRY .. py:data:: MODEL_REGISTRY .. py:data:: LOSS_REGISTRY .. py:data:: METRIC_REGISTRY