Team Ai
Apppublic

Saatvik/Multilabel

sourceHugging Facemitupdated 4y agoView on Hugging Face
0likes
model.py20 linesDownload Raw Back to root
1 2import torch3from torchvision import models4from torch import nn5 6def create_resnext():7    model = models.resnext50_32x4d(pretrained=True)8  9    torch.manual_seed(42)10    torch.cuda.manual_seed(42)11 12    for param in model.parameters():13        param.requires_grad = False14 15    model.fc = nn.Sequential(16      nn.Linear(in_features=2048, out_features=80, bias=True)17  )18 19    return model20