Cannot achieve SSIM score > 0.88

I have submitted several iterations of results where my model has achieved > 0.81 accuracy/sparse categorical accuracy, but the saliency score has not exceeded 0.89.

Despite consulting the various threads re: Similarity Score on the discussion forum, I am unable to achieve the 0.95 threshold.

  • My model architecture is the same as the CamCatsDogs lab:
  • The final output layer has two output neurons and a softmax activation.
  • Train batch size is 80%.
  • Sparse categorical crossentropy as loss func, accuracy as the metric.

My model is below:

Any advice greatly appreciated! Thank you.

1 Like

Hi there,

First advice I can give you is to not upload your entire code here because it defeats the purpose of learning for other students.

Second thing wrong I can see is the calculation of the expected_output is not right. Try to modify and see the effects.

Thank you for your message. Appreciate the help.


I have changed the ‘expected_output’ to:

tf.one_hot([label] * img2.shape[0], num_classes)

However I receive exactly the same score. Could you please let me know where I am going wrong here, specifically?

Thank you for your help.

Send me a copy of your code in private message. Also where do you suspect the problem is?

I saw the code, if you say it trains well and have good accuracy and as far as I see there are no issues with the do_salience function. However at " Generate saliency maps at 18 epochs" section you are not supposed to load weights at 18 epochs, you are not given those. In the previous cell the model is trained from 15 epochs + 3 epochs so it reaches 18 epochs. So beneath you just do salience for the 5 images.

That fixed it - I removed the line where I loaded the weights from the 18th epoch and it passed. Thank you very much, this was becoming very frustrating.

1 Like