Merge pull request #2358 from turicas/cache_dir

Add cache_dir example
This commit is contained in:
Ross Wightman 2024-12-06 10:25:29 -08:00 committed by GitHub
commit 9cec2f17cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,6 +89,10 @@ def create_model(
>>> model = create_model('mobilenetv3_large_100', pretrained=True, num_classes=10)
>>> model.num_classes
10
>>> # Create a Dinov2 small model with pretrained weights and save weights in a custom directory.
>>> model = create_model('vit_small_patch14_dinov2.lvd142m', pretrained=True, cache_dir="/data/my-models")
>>> # Data will be stored at `/data/my-models/models--timm--vit_small_patch14_dinov2.lvd142m/`
```
"""
# Parameters that aren't supported by all models or are intended to only override model defaults if set