To be brief, I just have no idea why torch.bool (and other integer dtypes except for torch.int32) is considered to be not supported by PyTorch (it seems to work for me with PyTorch 2.3). I will be glad to add a PR.
|
if mode in {"constant", "reflect", "edge", "replicate", "wrap", "circular"} and img.dtype not in { |
|
torch.int16, |
|
torch.int64, |
|
torch.bool, |
|
torch.uint8, |
|
}: |
To be brief, I just have no idea why
torch.bool(and other integer dtypes except for torch.int32) is considered to be not supported by PyTorch (it seems to work for me with PyTorch 2.3). I will be glad to add a PR.MONAI/monai/transforms/croppad/functional.py
Lines 99 to 104 in 4029c42