( model_name: str pretrained: bool = False pretrained_cfg: Union = None pretrained_cfg_overlay: Optional = None checkpoint_path: str = '' scriptable: Optional = None exportable: Optional = None no_jit: Optional = None **kwargs )
Create a model.
Lookup model’s entrypoint function and pass relevant args to create a new model.
Keyword Args: drop_rate (float): Classifier dropout rate for training. drop_path_rate (float): Stochastic depth drop rate for training. global_pool (str): Classifier global pooling type.
Example:
>>> from timm import create_model
>>> # Create a MobileNetV3-Large model with no pretrained weights.
>>> model = create_model('mobilenetv3_large_100')
>>> # Create a MobileNetV3-Large model with pretrained weights.
>>> model = create_model('mobilenetv3_large_100', pretrained=True)
>>> model.num_classes
1000
>>> # Create a MobileNetV3-Large model with pretrained weights and a new head with 10 classes.
>>> model = create_model('mobilenetv3_large_100', pretrained=True, num_classes=10)
>>> model.num_classes
10
( filter: Union = '' module: str = '' pretrained: bool = False exclude_filters: Union = '' name_matches_cfg: bool = False include_tags: Optional = None )
Parameters
Return list of available model names, sorted alphabetically
Example: model_list(‘gluon_resnet’) — returns all models starting with ‘gluon_resnet’ model_list(’resnext*, ‘resnet’) — returns all models with ‘resnext’ in ‘resnet’ module