Wrappers
Reference information for the model Wrappers
API.
eva.vision.models.wrappers.TimmModel
Bases: BaseModel
Model wrapper for timm
models.
Note that only models with forward_intermediates
method are currently supported.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name |
str
|
Name of model to instantiate. |
required |
pretrained |
bool
|
If set to |
True
|
checkpoint_path |
str
|
Path of checkpoint to load. |
''
|
out_indices |
int | Tuple[int, ...] | None
|
Returns last n blocks if |
None
|
model_kwargs |
Dict[str, Any] | None
|
Extra model arguments. |
None
|
tensor_transforms |
Callable | None
|
The transforms to apply to the output tensor produced by the model. |
None
|
Source code in src/eva/vision/models/wrappers/from_timm.py
load_model
Builds and loads the timm model as feature extractor.