This commit is contained in:
2026-05-02 00:08:38 +02:00
parent e93dfe1017
commit a80d996b0c

View File

@@ -36,5 +36,46 @@ Root_dir/
```
once this is done manually
once this is manually done, We can run finetunning a selected model. For now, 4 models are implemented.
- ResNet-18
- ResNet-50
- DenseNet121
- Inception
## Fine tuning
### Preparation
Lets say we want to finetune **Inception**. In `Tune.py` we have to adjust the variables accordingly like so:
```py
# Set the class size. e.g
CLASS_SIZE = 50
# set the batch eg.
BATCH_SIZE = 16
# set the Tuning epochs. e.g
EPOCH = 20
# set the correct image size
# if ResNet or DenseNet, we set this to 224
RESOLUTION = 299
# set the model architecture
arch = Architecture.INCEPTION
```
Other variable that we can change are those that are related to data size. Namely Training sample size and full sample size.
```py
# full sample size per class
SAMPLE_SIZE = 30
# Training sample size is then (full_sample - test_sample)
TRAINING_SMPLE = 28
# while at it, we can also set the learning rate
LR_RATE = 0.0001
```
### Rune the process
After we have set all necessary variables to our liking, we run the process by running Tune.py with python interpreter
```shell
# open terminal, cd to project root and run
python Tune.py
```