MCPcopy Create free account
hub / github.com/NVIDIA/DALI / _tests

Function _tests

dali/test/python/operator_2/test_resize.py:592–631  ·  view source on GitHub ↗
(dim, backend)

Source from the content-addressed store, hash-verified

590
591
592def _tests(dim, backend):
593 batch_size = 2 if dim == 3 else 10
594 # - Cannot test linear against PIL, because PIL uses triangular filter when downscaling
595 # - Cannot test Nearest Neighbor because rounding errors cause gross discrepancies (pixel shift)
596 for mode in ["default", "stretch", "not_smaller", "not_larger"]:
597 for (
598 interp,
599 dtype,
600 channel_first,
601 use_size_arg,
602 use_size_input,
603 w_input,
604 h_input,
605 d_input,
606 use_roi,
607 ) in [
608 (0, types.UINT8, True, False, False, False, False, False, False),
609 (1, types.FLOAT, False, False, False, False, True, True, True),
610 (0, types.FLOAT, True, False, False, True, True, False, True),
611 (1, types.FLOAT, False, False, False, True, False, True, False),
612 (0, types.UINT8, True, True, False, False, False, False, True),
613 (1, types.UINT8, False, True, True, False, False, False, False),
614 ]:
615 interp = [types.INTERP_TRIANGULAR, types.INTERP_LANCZOS3][interp]
616 yield (
617 _test_ND,
618 backend,
619 dim,
620 batch_size,
621 channel_first,
622 mode,
623 interp,
624 dtype,
625 w_input,
626 h_input,
627 d_input,
628 use_size_arg,
629 use_size_input,
630 use_roi,
631 )
632
633
634def test_2D_gpu():

Callers 6

test_2D_gpuFunction · 0.85
test_3D_gpuFunction · 0.85
test_2D_cpuFunction · 0.85
test_3D_cpuFunction · 0.85
test_2D_cvcudaFunction · 0.85
test_3D_cvcudaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected