Skip to content

Support more dtypes in pad_nd #7842

Open
@function2-llx

Description

@function2-llx

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,
}:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions