Week 4 Assignment: Cats vs. Dogs Saliency Map

Hello
I completed the assignment and everything runs great, but when I submit the “images.zip”, I always get “Your images achieved an average structural similarity index of 0.88. At least 0.95 is required to pass.” and I can’t achieve the required score to pass the assignment. What should I do to improve my score to pass?
Thanks in advance.

When you trained the model on 3 epochs, what did your loss and accuracy look like? Here’s mine…

They are very similar to yours:

I discovered the problem which is I shuffled the training set, which I shouldn’t have done for predictability in the grading.

3 Likes

I didn’t shuffle the training set and trained for 3 epochs, and got this:

Your images achieved an average structural similarity index of 0.94. At least 0.95 is required to pass.
Detailed list:
structural similarity index for ‘salientcat1.jpg’: 0.94.
structural similarity index for ‘salientcat2.jpg’: 0.95.
structural similarity index for ‘salientcatanddog.jpg’: 0.93.
structural similarity index for ‘salientdog1.jpg’: 0.93.
structural similarity index for ‘salientdog2.jpg’: 0.94.

My training looks okay:

Epoch 1/3
582/582 [==============================] - 40s 69ms/step - loss: 0.4531 - accuracy: 0.7972
Epoch 2/3
582/582 [==============================] - 40s 69ms/step - loss: 0.4405 - accuracy: 0.8040
Epoch 3/3
582/582 [==============================] - 40s 69ms/step - loss: 0.4310 - accuracy: 0.8113

Do you have any ideas what the problem could be?

(I also tried multiple loss functions)

Solved it myself. The issue was the loss function I picked. I could have picked a better one.

2 Likes