This line of code



 Deb_Prakash_Chatterj:

single_loaded_img = single_loaded_img[None, None]


unsqueezes the tensor twice, which will most likely create the issue.
Remove one None and rerun your code.