YOLO Negative class in Pytorch?

Hi all, While training for YOLO darknet, I can leave an annotation file empty and still darknet accepts the image and considers it as a negative class on a whole. But when I tried to do the same in PyTorch (providing no bounding box) I got an error while training stating that the tensor was empty.

Can someone suggest me how to specify negative classes in PyTorch ?