The registration mechanism is an important part of HAT, which plays an important role in building config.
This section illustrates how to add a new module using the registration mechanism and how to use it in config by using a custom module as an example.
Here we use backbone as an example to demonstrate how to develop a new module (e.g., mobilenet).
Create a new file: hat/models/backbones/mobilenet.py.
You can import the newly defined module by adding the following line in hat/models/backbones/__init__.py:
Backbone inConfigSimilarly, You can register and use other registrable module by using this method.