C4W4: Cats vs Dogs Saliency - Scaling Issue

In the cats vs dogs saliency assignment I was having an issue where my model was not training. I could load the pre-trained weights, but the predictions were only about 50% accurate.

I eventually figured out that my image scaling was off. I was using tf.image.convert_image_dtype to convert the image type and then scaling using image/255.0. I had not realized that tf.image.convert_image_dtype not only converts datatypes, but also handles the scaling so I was actually scaling the images twice.

It might be nice to have a unit test block to confirm image scaling is performed correctly before proceeding.

I just wanted to share in case somebody else encounters this issue.

Thanks for sharing, @nat2! And nice debugging