Hyperparameters control the learning process of a machine learning model. It is, therefore, crucial to fine-tune them to get the best CNN architecture. Nevertheless, tuning hyperparameters is one of the most tedious tasks in machine learning projects. Thus, we wrote an optimization algorithm, using Optuna package, to tune the different hyperparameters, minimized in our study. Over 500 trials have been implemented on the MatriCS HPC platform of our Universite de Picardie Jules Verne. We divide the optimization process into two stages.