@ptrblck Thank you. That solved it. I am a newbie to pytorch. Why should that happen? I used a similar image to the image I trained the model with.
I also used the same transformer when loading my dataset during training