Hi Patrick,
You right once again the problem is not with is_crowded but with image_id which should be a scalar according to the tutorial. I tried to expand it to be with shape as is_crowded (which I don’t know if it is the right thing to do) but encountered other error:
  File "/home/lab/avivshamsian/CATER-modi/object_detection/training.py", line 68, in <module>
    train_one_epoch(model, optimizer, train_loader, device, epoch, print_freq=10, save_path=save_path)
  File "/home/lab/avivshamsian/CATER-modi/object_detection/engine.py", line 32, in train_one_epoch
    loss_dict = model(images, targets)
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 152, in forward
    outputs = self.parallel_apply(replicas, inputs, kwargs)
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 162, in parallel_apply
    return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 85, in parallel_apply
    output.reraise()
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torch/_utils.py", line 385, in reraise
    raise self.exc_type(msg)
RuntimeError: Caught RuntimeError in replica 0 on device 0.
Original Traceback (most recent call last):
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 60, in _worker
    output = module(*input, **kwargs)
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torchvision/models/detection/generalized_rcnn.py", line 51, in forward
    proposals, proposal_losses = self.rpn(images, features, targets)
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torchvision/models/detection/rpn.py", line 409, in forward
    proposals = self.box_coder.decode(pred_bbox_deltas.detach(), anchors)
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torchvision/models/detection/_utils.py", line 168, in decode
    rel_codes.reshape(sum(boxes_per_image), -1), concat_boxes
  File "/home/lab/avivshamsian/.local/lib/python3.6/site-packages/torchvision/models/detection/_utils.py", line 199, in decode_single
    pred_ctr_x = dx * widths[:, None] + ctr_x[:, None]
RuntimeError: expected device cuda:0 but got device cuda:1