C3W4 assignment Structural similarity Index

Hi,
My structural similarity index is above 0.88 on all pictures except one but still I am receiving 0 grades?

@Sajjad_Ali

some of the images shows lesser than 0.88, probably the reason for grade failure.

Refer this post

Regards
DP

Hi Deepti,
yeah only two pictures shows less SSI but i should be graded for the correct one and I don’t think I can make it better (model) on the required code.

I should clear the quiz if you see the statement above, it says at least 0.88 SSI require to clear the test and i achieved that if i combine the prob and divide by 5 i received exact that.

@Sajjad_Ali

i remember when I had similar issue having an average of 90 ssi but one of my image ssi score was below 80, I had failed the grader.

So that’s why pointing you to recheck your codes.

Also I had run down the optional exercise too before submitting when my first submission had failed.

Thinks to check is the model instructions mentions epoch training only for 3, so I hope you have gone through all the points.

Regards
DP

I leave it you, I have provided you the link to check where other learners had similar issue. So I had provided grade wise code checked.

Regards
DP

i have checked the link which you provided, I did exactly what it requires, but one point I am confused you said “sparse_categorical_crossentropy” should not be used? am i understand correct?

no I didn’t say that, learners were doing a mistake for the expected output array where tf.one_hot function needed to be used to the correct label and the image.

But that sparse point was for the tf.gradient tape, to point which loss needed to be used. as the loss in the gradient tape predicts between the number of classes, it is not sparse but tf.keras.losses.categorical_crossentropy( )

Another usual mistake done was in augment images where they hard coded the path.

another check point is where images are converted to bgb to rgb and then again image is resized to normalise pixel value to range [0,1]

you won’t believe i didn’t change anything just re run the code again and it cleared the grad threshold, maybe it was a bug or something.

I have seen in tensorflow assignment sometime refreshing, get grading passed. it is probably because of randomness of loss gradient. honestly even I don’t know but I have seen in other assignments just reopening the assignment again after sometime has also resolved issue.

1 Like