Ma Zerun c127c474b9
[Feature] Support getting model from the name defined in the model-index file. (#1236)
* [Feature] Support getting model from the name defined in the model-index file.

* Add unit tests.

* Prevent import `timm` if the `TIMMBackbone` is not used.

* Fix Windows CI.

* Move `init_model` to `mmcls.apis.hub`, and support pass nn.Module to all
model components.

* Fix requirements

* Rename `hub.py` to `model.py` and add unit tests.
2022-12-06 17:00:22 +08:00

30 lines
425 B
ReStructuredText

.. role:: hidden
:class: hidden-section
.. module:: mmcls.apis
mmcls.apis
===================================
These are some high-level APIs for classification tasks.
.. contents:: mmcls.apis
:depth: 2
:local:
:backlinks: top
Model
------------------
.. autofunction:: list_models
.. autofunction:: get_model
.. autofunction:: init_model
Inference
------------------
.. autofunction:: inference_model