如何获取Transformers中各支持Backbone模型的配置字符串映射?
问题:寻找Transformers中各Backbone模型对应的配置字符串参数
我运行了以下示例代码:
from transformers import TimmBackboneConfig, TimmBackbone # Initializing a timm backbone configuration = TimmBackboneConfig("resnet50") # Initializing a model from the configuration model = TimmBackbone(configuration) # Accessing the model configuration configuration = model.config
该示例来自Hugging Face Transformers官方文档的Backbones章节。
现在我希望使用该章节中列出的其他支持的Backbone模型:
- BEiT
- BiT
- ConvNet
- ConvNextV2
- DiNAT
- DINOV2
- FocalNet
- MaskFormer
- NAT
- ResNet
- Swin Transformer
- Swin Transformer v2
- ViTDet
我想知道哪里可以找到这些模型对应的配置字符串映射关系,即每个模型应该使用的字符串参数是什么?例如:
- "ResNet" -> 'resnet50'
- "BEiT" -> ???
我已尝试在该章节的相关链接及谷歌中搜索,但未找到相关信息。
内容的提问来源于stack exchange,提问作者ChaosPredictor
相关产品推荐
相关产品推荐

