Models¶
Create Model¶
mindcv.models.model_factory.create_model(model_name, num_classes=1000, pretrained=False, in_channels=3, checkpoint_path='', ema=False, auto_mapping=False, **kwargs)
¶
Creates model by name.
PARAMETER | DESCRIPTION |
---|---|
model_name |
The name of model.
TYPE:
|
num_classes |
The number of classes. Default: 1000.
TYPE:
|
pretrained |
Whether to load the pretrained model. Default: False.
TYPE:
|
in_channels |
The input channels. Default: 3.
TYPE:
|
checkpoint_path |
The path of checkpoint files. Default: "".
TYPE:
|
ema |
Whether use ema method. Default: False.
TYPE:
|
auto_mapping |
Whether to automatically map the names of checkpoint weights to the names of model weights when there are differences in names. Default: False.
TYPE:
|
**kwargs |
additional args, e.g., "features_only", "out_indices".
DEFAULT:
|
Source code in mindcv/models/model_factory.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|