Skip to content

Instantly share code, notes, and snippets.

@Gholamrezadar
Created May 26, 2024 18:16
Show Gist options
  • Save Gholamrezadar/eec044c4b49a5769f0a74934e1539a98 to your computer and use it in GitHub Desktop.
Save Gholamrezadar/eec044c4b49a5769f0a74934e1539a98 to your computer and use it in GitHub Desktop.
timm starter
import timm
# List of models
timm.list_models()
timm.list_models(pretrained=True)
# Create a model
model = timm.create_model('resnet18', pretrained=True, num_classes=10) #default=1000
# get the input size of the model
model.default_cfg["input_size"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment