Assertion error in generalized_rcnn.py

I am using pretrained models in order to perform a detection pipeline in Pytorch. The problem is that, when I send the image to the model, the generalized_rcnn.py raises an assert len(val) == 2. The image is a tensor of shape torch.Size([1, 3, 300, 550]), and its length is, in fact:
image

Given that, I would to know if there is any error from my part.