Closed MarkB2 closed 3 years ago
Executing dls = pascal.dataloaders(path/'train') results in Could not do one pass in your dataloader, there is something wrong in it
dls = pascal.dataloaders(path/'train')
Could not do one pass in your dataloader, there is something wrong in it
Summary gets
/usr/local/lib/python3.7/dist-packages/fastai/vision/data.py in clip_remove_empty(bbox, label) 33 bbox = torch.clamp(bbox, -1, 1) 34 empty = ((bbox[...,2] - bbox[...,0])*(bbox[...,3] - bbox[...,1]) <= 0.) ---> 35 return (bbox[~empty], label[~empty]) 36 37 # Cell
TypeError: no implementation found for 'torch.Tensor.getitem' on types that implement __torch_function__: [TensorMultiCategory, TensorBBox]
Solution is to add contiguous casting to tensor bounding box, however the question then becomes this is really a fastai issue (and why didn't tests catch this)
Executing
dls = pascal.dataloaders(path/'train')
results inCould not do one pass in your dataloader, there is something wrong in it
Summary gets
/usr/local/lib/python3.7/dist-packages/fastai/vision/data.py in clip_remove_empty(bbox, label) 33 bbox = torch.clamp(bbox, -1, 1) 34 empty = ((bbox[...,2] - bbox[...,0])*(bbox[...,3] - bbox[...,1]) <= 0.) ---> 35 return (bbox[~empty], label[~empty]) 36 37 # Cell
TypeError: no implementation found for 'torch.Tensor.getitem' on types that implement __torch_function__: [TensorMultiCategory, TensorBBox]