what if target is None in https://github.com/pytorch/vision/blob/main/references/detection/engine.py#L27

somehow that the hard negtive sample is also needed to let the network knows the net better ,but in the code

‘’‘for images, targets in metric_logger.log_every(data_loader, print_freq, header):
images = list(image.to(device) for image in images)
targets = [{k: v.to(device) for k, v in t.items()} for t in targets]
with torch.cuda.amp.autocast(enabled=scaler is not None):
loss_dict = model(images, targets)
losses = sum(loss for loss in loss_dict.values())‘’’

it could not handle if the target is None