I had a bigger dataset and i trained my model with 5 folds in it , each fold will give a best weights file. Now is there any way to merge all the 5 weights file into single weight file.
class ImgClassifier(nn.Module): def __init__(self, model_arch, n_class, pretrained=False): super().__init__() self.model = timm.create_model(model_arch, pretrained=pretrained) n_features = self.model.classifier.in_features self.model.classifier = nn.Linear(n_features, n_class) def forward(self, x): x = self.model(x) return x
how to acheive it ? any idea would be helpful .