It seems that the image that is causing this error might be a gray-scaled image with only one channel. Can you verify that verify the shape of the resulting tensor for that image before feeding it to the model?