Transforms
Reference information for the model Transforms
API.
eva.models.transforms.ExtractCLSFeatures
Extracts the CLS token from a ViT model output.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cls_index |
int
|
The index of the CLS token in the output tensor. |
0
|
num_register_tokens |
int
|
The number of register tokens in the model output. |
0
|
include_patch_tokens |
bool
|
Whether to concat the mean aggregated patch tokens with the cls token. |
False
|
Source code in src/eva/core/models/transforms/extract_cls_features.py
eva.models.transforms.ExtractPatchFeatures
Extracts the patch features from a ViT model output.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
has_cls_token |
bool
|
If set to |
True
|
num_register_tokens |
int
|
The number of register tokens in the model output. |
0
|
ignore_remaining_dims |
bool
|
If set to |
False
|