Ahmadzei's picture
added 3 more tables for large emb model
5fa1a76
raw
history blame contribute delete
346 Bytes
from transformers import MaskFormerConfig, MaskFormerForInstanceSegmentation, ResNetConfig
backbone_config = ResNetConfig.from_pretrained("microsoft/resnet-50")
config = MaskFormerConfig(backbone_config=backbone_config)
model = MaskFormerForInstanceSegmentation(config)
Set use_pretrained_backbone=False to randomly initialize a ResNet backbone.