1. 安装timm
pip install timm
2. 打印模型
import timm
# 获取并打印所有可用的预训练模型名称
available_models = timm.list_models()
# 打印出所有的模型
print(available_models)
# 打印所有包含"resnet"字符的模型名称
resnet_models = timm.list_models('*resnet*')
print(resnet_models)
# 打印所有包含"resnet"字符的模型名称
resnet18_models = timm.list_models('*resnet18')
print(resnet18_models)
# 打印所有包含"resnet"字符的模型名称
swin_models = timm.list_models('*swin*')
print(swin_models)
GitHub - huggingface/pytorch-image-models: PyTorch image models, scripts, pretrained weights -- ResNet, ResNeXT, EfficientNet, NFNet, Vision Transformer (ViT), MobileNet-V3/V2, RegNet, DPN, CSPNet, Swin Transformer, MaxViT, CoAtNet, ConvNeXt, and morePyTorch image models, scripts, pretrained weights -- ResNet, ResNeXT, EfficientNet, NFNet, Vision Transformer (ViT), MobileNet-V3/V2, RegNet, DPN, CSPNet, Swin Transformer, MaxViT, CoAtNet, ConvNeXt, and more - huggingface/pytorch-image-modelshttps://github.com/huggingface/pytorch-image