added more models for testing

This commit is contained in:
2026-05-05 21:04:33 +02:00
parent 1c04344ad6
commit 4cc9fa2bac
11 changed files with 143 additions and 21 deletions

View File

@@ -10,12 +10,12 @@ from architectures.Model import Model
class Inception(Model):
def get(self):
model = models.inception_v3(weights=models.Inception_V3_Weights.DEFAULT)
m = models.inception_v3(weights=models.Inception_V3_Weights.DEFAULT)
#for param in model.parameters():
# param.requires_grad = False
model.fc = nn.Linear(model.fc.in_features, self.size)
model.AuxLogits.fc = nn.Linear(model.AuxLogits.fc.in_features, self.size)
return model.to(self.device)
m.AuxLogits.fc = nn.Linear(m.AuxLogits.fc.in_features, self.size)
m.fc = nn.Linear(m.fc.in_features, self.size)
return m
def train(self, epochs, loader, rate):
# Override because Inception returns a tuple (main, aux)