added two modfels

This commit is contained in:
2026-05-03 17:48:51 +02:00
parent a80d996b0c
commit 1c04344ad6
4 changed files with 23 additions and 37 deletions

View File

@@ -10,7 +10,7 @@ from architectures.Model import Model, Architecture
# numbre of classes
CLASS_SIZE = 20
# batch
BATCH_SIZE = 8
BATCH_SIZE = 16
# size of images per class trainset + testset
# 30 works best, more than that and we dont have enough data
@@ -33,7 +33,8 @@ RESOLUTION = 224
# - RESNET50
# - DENSENET121
# - INCEPTION
arch = Architecture.RESNET18
# - GOOGLENET
arch = Architecture.EFFICIENTNET
# DATA PREPARATION
# load data set and prepare
@@ -94,7 +95,7 @@ model.train(
# save.
torch.save(
model.get().state_dict(),
f'{arch.name}.pth')
f'{arch.name.lower()}.pth')
# done tuning
print('Model saved!')
@@ -118,4 +119,4 @@ print(f"Total test images for these {CLASS_SIZE} classes: {len(test_data)}")
# Evaluate
model.evaluate(
loader = test_loader)
loader = test_loader)