TASK#06.3 - Entrenament del model amb el dataset seleccionat
jbericat opened this issue · 2 comments
jbericat commented
TASK#06.3 - Entrenament del model amb el dataset seleccionat
jbericat commented
log de consola durant l'entrenament:
(condapy373) jbericat@TFG-UOC:~/Workspaces/uoc.tfg.jbericat$ cd /home/jbericat/Workspaces/uoc.tfg.jbericat ; /usr/bin/env /home/jbericat/anaconda3/envs/py364/bin/python /home/jbericat/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/launcher 33109 -- /home/jbericat/Workspaces/uoc.tfg.jbericat/src/CNN/pytorch_training.py
Set the model version you want to train:
1 = v1.0 -> 3 layers CNN (simplified LeNet)
2 = v2.0 -> 5 layers CNN (LeNet)
3 = v3.0 -> 14 layers CNN (custom)
3
Set the dataset version you want to use to train the model:
4 = v4.0 -> EXPERIMENTAL
5 = v5.0 -> EXPERIMENTAL
6 = v6.0 -> EXPERIMENTAL
7 = v7.0 -> 3 classes, close distance images (SMALL DATASET, appropiate for adjusting parameters)
8 = v8.0 -> 4 classes, close and long distance images (NEEDS CODE ADAPTATION)
9 = v9.0 -> 3 classes, close and long distance images
9
[INFO] generating the train/validation split...
[INFO] Training the convolution neural network model, hold-on tight...
[INFO] EPOCH: 1/40
Train loss: 0.846022, Train accuracy: 52.2939
Val loss: 1.438365, Val accuracy: 52.0420
[INFO] EPOCH: 2/40
Train loss: 0.630993, Train accuracy: 52.5661
Val loss: 2.130065, Val accuracy: 52.0420
[INFO] EPOCH: 3/40
Train loss: 0.478229, Train accuracy: 54.2768
Val loss: 1.424662, Val accuracy: 53.7923
[INFO] EPOCH: 4/40
Train loss: 0.419436, Train accuracy: 59.0202
Val loss: 0.957492, Val accuracy: 59.8600
[INFO] EPOCH: 5/40
Train loss: 0.392551, Train accuracy: 79.7045
Val loss: 0.644665, Val accuracy: 78.2964
[INFO] EPOCH: 6/40
Train loss: 0.470024, Train accuracy: 87.2473
Val loss: 0.460562, Val accuracy: 88.5648
[INFO] EPOCH: 7/40
Train loss: 0.529722, Train accuracy: 87.7138
Val loss: 0.534788, Val accuracy: 88.2147
[INFO] EPOCH: 8/40
Train loss: 0.386206, Train accuracy: 86.2753
Val loss: 0.462420, Val accuracy: 88.0980
[INFO] EPOCH: 9/40
Train loss: 0.446050, Train accuracy: 84.3313
Val loss: 0.651204, Val accuracy: 83.1972
[INFO] EPOCH: 10/40
Train loss: 0.492534, Train accuracy: 86.4697
Val loss: 0.582419, Val accuracy: 87.7480
[INFO] EPOCH: 11/40
Train loss: 0.415455, Train accuracy: 87.0529
Val loss: 0.475058, Val accuracy: 87.0478
[INFO] EPOCH: 12/40
Train loss: 0.339368, Train accuracy: 89.7356
Val loss: 0.461808, Val accuracy: 89.2649
[INFO] EPOCH: 13/40
Train loss: 0.390198, Train accuracy: 87.7916
Val loss: 0.456128, Val accuracy: 89.1482
[INFO] EPOCH: 14/40
Train loss: 0.393019, Train accuracy: 88.4137
Val loss: 0.438391, Val accuracy: 88.2147
[INFO] EPOCH: 15/40
Train loss: 0.481210, Train accuracy: 85.3033
Val loss: 0.623774, Val accuracy: 85.8810
[INFO] EPOCH: 16/40
Train loss: 0.477560, Train accuracy: 88.8802
Val loss: 0.453426, Val accuracy: 88.3314
[INFO] EPOCH: 17/40
Train loss: 0.333767, Train accuracy: 86.5863
Val loss: 0.610297, Val accuracy: 86.6978
[INFO] EPOCH: 18/40
Train loss: 0.337468, Train accuracy: 89.2302
Val loss: 0.461570, Val accuracy: 89.4982
[INFO] EPOCH: 19/40
Train loss: 0.322981, Train accuracy: 88.7247
Val loss: 0.409267, Val accuracy: 88.5648
[INFO] EPOCH: 20/40
Train loss: 0.313731, Train accuracy: 88.4526
Val loss: 0.452217, Val accuracy: 86.1144
[INFO] EPOCH: 21/40
Train loss: 0.329054, Train accuracy: 86.3919
Val loss: 0.583176, Val accuracy: 87.5146
[INFO] EPOCH: 22/40
Train loss: 0.373652, Train accuracy: 89.5412
Val loss: 0.393987, Val accuracy: 89.3816
[INFO] EPOCH: 23/40
Train loss: 0.326551, Train accuracy: 87.5194
Val loss: 0.595131, Val accuracy: 86.4644
[INFO] EPOCH: 24/40
Train loss: 0.390254, Train accuracy: 88.1804
Val loss: 0.577970, Val accuracy: 87.1645
[INFO] EPOCH: 25/40
Train loss: 0.365580, Train accuracy: 89.7356
Val loss: 0.494484, Val accuracy: 88.7981
[INFO] EPOCH: 26/40
Train loss: 0.315796, Train accuracy: 90.7076
Val loss: 0.424512, Val accuracy: 90.8985
[INFO] EPOCH: 27/40
Train loss: 0.292366, Train accuracy: 90.2022
Val loss: 0.342780, Val accuracy: 90.7818
[INFO] EPOCH: 28/40
Train loss: 0.290522, Train accuracy: 90.4743
Val loss: 0.389994, Val accuracy: 90.5484
[INFO] EPOCH: 29/40
Train loss: 0.287033, Train accuracy: 89.5412
Val loss: 0.408290, Val accuracy: 88.5648
[INFO] EPOCH: 30/40
Train loss: 0.260318, Train accuracy: 90.2799
Val loss: 0.326114, Val accuracy: 90.7818
[INFO] EPOCH: 31/40
Train loss: 0.314302, Train accuracy: 91.0964
Val loss: 0.333784, Val accuracy: 91.0152
[INFO] EPOCH: 32/40
Train loss: 0.352160, Train accuracy: 89.9689
Val loss: 0.356116, Val accuracy: 90.4317
[INFO] EPOCH: 33/40
Train loss: 0.339128, Train accuracy: 92.1073
Val loss: 0.360309, Val accuracy: 91.9487
[INFO] EPOCH: 34/40
Train loss: 0.317877, Train accuracy: 88.3359
Val loss: 0.535564, Val accuracy: 86.5811
[INFO] EPOCH: 35/40
Train loss: 0.312256, Train accuracy: 91.0187
Val loss: 0.467218, Val accuracy: 91.2485
[INFO] EPOCH: 36/40
Train loss: 0.258093, Train accuracy: 91.6407
Val loss: 0.307297, Val accuracy: 90.5484
[INFO] EPOCH: 37/40
Train loss: 0.308142, Train accuracy: 90.4355
Val loss: 0.343613, Val accuracy: 90.7818
[INFO] EPOCH: 38/40
Train loss: 0.286471, Train accuracy: 91.0964
Val loss: 0.445487, Val accuracy: 91.5986
[INFO] EPOCH: 39/40
Train loss: 0.330049, Train accuracy: 91.4463
Val loss: 0.398451, Val accuracy: 90.3151
[INFO] EPOCH: 40/40
Train loss: 0.288642, Train accuracy: 91.4463
Val loss: 0.343720, Val accuracy: 90.8985
[INFO] Finished Training. Generating summary tarball...
[INFO] Training model and summary file saved at: /home/jbericat/Workspaces/uoc.tfg.jbericat/bin/CNN/cnn-training_20211230-134145.tar.gz
(condapy373) jbericat@TFG-UOC:~/Workspaces/uoc.tfg.jbericat$
jbericat commented
S'assoleix un rendiment del 86%, per sobre de l'esperat. Es documenta tot el procés a la memòria parcial del projecte. Tasca finalitzada.