Skip to main content
. 2021 Apr 19;57(4):395. doi: 10.3390/medicina57040395
Algorithm 1. The 5-CNN model description
Input: thyroidal images of dimension (500 px, 500 px) from the train dataset.
Output: CNN model weights
1. for each image in the dataset
2. Resize image to (224 px, 224 px)
3. Normalize the image pixels values between [0, 1].
4. end
5. Add a first convolutional layer with a RELU activation function.
6. Add a second convolutional layer with a RELU activation function.
7. Apply a max pooling layer for down-sampling feature map from the previous layer.
8. Repeat the steps 4 and 5 for three times.
9. Add a Flatten layer on the output obtained from the last max-pooling layer.
10. Add a fully connected layer with 256 hidden units.
11. Apply a dropout for inactivate neurons in the previous layer.
12. Add a fully connected layer with 4 hidden units and a softmax activation function.
13. Optimize the model with RMSProp optimizer with a learning rate of 0.0001.
14. Train the model for 100 epochs.
15. Save the final model.