(m)
| 2283 | |
| 2284 | |
| 2285 | def _to_numpy_resample_padding_mode(m): |
| 2286 | ret = look_up_option(str(m), NdimageMode, default=None) |
| 2287 | if ret is not None: |
| 2288 | return ret |
| 2289 | _mapping = { |
| 2290 | GridSamplePadMode.ZEROS: NdimageMode.CONSTANT, |
| 2291 | GridSamplePadMode.BORDER: NdimageMode.NEAREST, |
| 2292 | GridSamplePadMode.REFLECTION: NdimageMode.REFLECT, |
| 2293 | } |
| 2294 | ret = look_up_option(str(m), _mapping, default=None) |
| 2295 | if ret is not None: |
| 2296 | return ret |
| 2297 | return look_up_option(str(m), list(_mapping) + list(NdimageMode)) |
| 2298 | |
| 2299 | |
| 2300 | def _to_torch_resample_padding_mode(m): |
no test coverage detected
searching dependent graphs…