Currently making progress with the fix:
# images, targets = self.transform(images, targets)
images, _ = self.transform(images)


to:

  
      github.com
  
  
    pytorch/vision/blob/master/torchvision/models/detection/generalized_rcnn.py#L64 5



"""
if self.training and targets is None:
    raise ValueError("In training mode, targets should be passed")
original_image_sizes = torch.jit.annotate(List[Tuple[int, int]], [])
for img in images:
    val = img.shape[-2:]
    assert len(val) == 2
    original_image_sizes.append((val[0], val[1]))


images, targets = self.transform(images, targets)
features = self.backbone(images.tensors)
if isinstance(features, torch.Tensor):
    features = OrderedDict([(0, features)])
proposals, proposal_losses = self.rpn(images, features, targets)
detections, detector_losses = self.roi_heads(features, proposals, images.image_sizes, targets)
detections = self.transform.postprocess(detections, images.image_sizes, original_image_sizes)


losses = {}
losses.update(detector_losses)
losses.update(proposal_losses)