optimised

This commit is contained in:
2026-07-01 21:05:01 +02:00
commit 434d3b8198
34 changed files with 3286 additions and 0 deletions

22
architectures/ResNet34.py Normal file
View File

@@ -0,0 +1,22 @@
import torch.nn as nn
from torchvision import models
# Base model
from architectures.Model import Model
class ResNet34(Model):
def get(self):
m = models.resnet34(weights=models.ResNet34_Weights.DEFAULT)
# freez all layers
#for param in m.parameters():
# param.requires_grad = False
# unfreez the last two
#for param in m.layer3.parameters(): param.requires_grad = True
#for param in m.layer4.parameters(): param.requires_grad = True
m.fc = nn.Linear(m.fc.in_features, self.size)
return m