Initial commit

This commit is contained in:
2026-05-01 15:28:10 +02:00
commit 9285ede90a
14 changed files with 566 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import torch.nn as nn
from torchvision import models
from architectures.Model import Model
class DenseNet121(Model):
def get(self):
# load pretrained
m = models.densenet121(weights=models.DenseNet121_Weights.DEFAULT)
# will modify only the final layers
num_ftrs = m.classifier.in_features
m.classifier = nn.Linear(num_ftrs, self.size)
return m.to(self.device)