PyTorch-YOLOv3
PyTorch-YOLOv3 copied to clipboard
UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead.
when I train yolo v3 on coco, it WARNING that "/pytorch/aten/src/ATen/native/IndexingUtils.h:20: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead."
It's so many! How to fix it?

torch1.2.0--->torch1.1.0 torchvision=0.2.0
I met the same problem. Did you fixed it? @onefish51
I met the same problem. Did you fixed it? @onefish51
https://github.com/eriklindernoren/PyTorch-YOLOv3/blob/master/models.py#L191 obj_mask=obj_mask.bool() # convert int8 to bool noobj_mask=noobj_mask.bool() #convert int8 to bool
Replace in utils:269
ByteTensor = torch.cuda.ByteTensor if pred_boxes.is_cuda else torch.ByteTensor
With:
BoolTensor = torch.cuda.BoolTensor if pred_boxes.is_cuda else torch.BoolTensor
And it usage in lines 278, 279
obj_mask = BoolTensor(nB, nA, nG, nG).fill_(0)
noobj_mask = BoolTensor(nB, nA, nG, nG).fill_(1)
@paojianghu You should replace
obj_mask=obj_mask.bool() # convert int8 to bool
noobj_mask=noobj_mask.bool() #convert int8 to bool
in utils/utils.py after line 279