WEEK 6: Malaria Parasite Classification

Cem Bektaşoğlu
bbm406f19
Published in
3 min readJan 5, 2020

Hi everyone! This week we have come to the last week of our project. The previous week, we have implemented the ResNet-18 model and we had some results. This week, we implemented the AlexNet model.

AlexNet Results

First of all, we tested our dataset with pre-trained AlexNet model. And we compared to randomly chosen images’ real and predict labels.

Real:

Predict:

We achieved a result which is average success accuracy of %50.11 and the average loss of 0.0978. When we test our dataset, the batchsize is 8.

Later, we have trained the AlexNet model with our dataset. Our hyperparameters like that:

  • batch size = 8
  • epoch num = 7
  • optimizer = SGD , momentum = 0.9
  • learning rate = 0.001
  • Loss function = CrossEntropyLoss
SGD Optimizer

The highest accuracy score was %96 for the validation process. Then we tested this model with the test dataset. We obtained a %92 accuracy score.

We think our loss and accuracy values are normal. But we wanted to try Adam optimizer so we implemented it. We didn’t change the learning rate and other hyperparameters but Adam use betas, which used for calculating to gradient and its square, instead of momentum.

When we use Adam for the optimizer, our validation accuracy doesn’t change. We observe that our train and validation losses were changing so little.

Adam Optimizer With Learning Rate 0.001.

So we changed to learning rate to 0.01.

Adam Optimizer With Learning Rate 0.01.

As you can see in the graphs, the result didn’t change. Our train’s accuracies are lower than validation’s accuracies so there isn’t overfitting. We think Adam optimizer isn’t suitable for our dataset.

This week is the last week of the project. See you in other blog series.
Goodbye!

--

--