Skip to content

spatial resample -- adaptive padding mode when switching the backends #6222

@wyli

Description

@wyli

for the array pad functions there's numpy->torch mode str adaptation

def _convert_pt_pad_mode(padding_mode):
"""get the most similar mode of `pad` from ``padding_mode`` of the spatial resampling."""
if padding_mode is None or padding_mode in ("zeros", "constant", "grid-constant"):

would be great to implement the same idea for spatial resampling

def resolve_modes(interp_mode, padding_mode):
"""compute the backend and the corresponding mode for the given interpolation mode and padding mode."""
_interp_mode = None
_padding_mode = None

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions