MCPcopy
hub / github.com/pytorch/vision / test_exact_match

Method test_exact_match

test/test_transforms_v2.py:3126–3136  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3124 _get_kernel(F.resize, input_type)
3125
3126 def test_exact_match(self):
3127 # We cannot use F.resize together with self.KERNELS mapping here directly here, since this is only the
3128 # ideal wrapping. Practically, we have an intermediate wrapper layer. Thus, we create a new resize functional
3129 # here, register the kernels without wrapper, and check the exact matching afterwards.
3130 def resize_with_pure_kernels():
3131 pass
3132
3133 for input_type, kernel in self.KERNELS.items():
3134 _register_kernel_internal(resize_with_pure_kernels, input_type, tv_tensor_wrapper=False)(kernel)
3135
3136 assert _get_kernel(resize_with_pure_kernels, input_type) is kernel
3137
3138 def test_builtin_tv_tensor_subclass(self):
3139 # We cannot use F.resize together with self.KERNELS mapping here directly here, since this is only the

Callers

nothing calls this directly

Calls 2

_get_kernelFunction · 0.90

Tested by

no test coverage detected