Hi I tried what you advised however this error is triggered
RuntimeError                              Traceback (most recent call last)
 in ()
3 for epoch in range(num_epochs):
4     # train for one epoch, printing every 10 iterations
----> 5     train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq=10)
6     # update the learning rate
7     lr_scheduler.step()
5 frames
/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/roi_heads.py in fastrcnn_loss(class_logits, box_regression, labels, regression_targets)
40     # the corresponding ground truth labels, to be used with
41     # advanced indexing
—> 42     sampled_pos_inds_subset = torch.nonzero(labels > 0).squeeze(1)
43     labels_pos = labels[sampled_pos_inds_subset]
44     N, num_classes = class_logits.shape
RuntimeError: copy_if failed to synchronize: cudaErrorAssert: device-side assert triggered