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

Function check_slice_synth_data_vs_numpy

dali/test/python/operator_1/test_slice.py:413–468  ·  view source on GitHub ↗
(
    device,
    batch_size,
    input_shape,
    layout,
    axes,
    axis_names,
    normalized_anchor,
    normalized_shape,
    input_type,
    output_type,
)

Source from the content-addressed store, hash-verified

411
412
413def check_slice_synth_data_vs_numpy(
414 device,
415 batch_size,
416 input_shape,
417 layout,
418 axes,
419 axis_names,
420 normalized_anchor,
421 normalized_shape,
422 input_type,
423 output_type,
424):
425 eiis = [RandomDataIterator(batch_size, shape=input_shape) for k in range(2)]
426 eii_args = [
427 SliceArgsIterator(
428 batch_size,
429 len(input_shape),
430 image_shape=input_shape,
431 image_layout=layout,
432 axes=axes,
433 axis_names=axis_names,
434 normalized_anchor=normalized_anchor,
435 normalized_shape=normalized_shape,
436 )
437 for k in range(2)
438 ]
439
440 compare_pipelines(
441 SliceSynthDataPipeline(
442 device,
443 batch_size,
444 layout,
445 iter(eiis[0]),
446 iter(eii_args[0]),
447 axes=axes,
448 axis_names=axis_names,
449 normalized_anchor=normalized_anchor,
450 normalized_shape=normalized_shape,
451 input_type=input_type,
452 output_type=output_type,
453 ),
454 SliceSynthDataPipelinePythonOp(
455 batch_size,
456 layout,
457 iter(eiis[0]),
458 iter(eii_args[1]),
459 axes=axes,
460 axis_names=axis_names,
461 normalized_anchor=normalized_anchor,
462 normalized_shape=normalized_shape,
463 input_type=input_type,
464 output_type=output_type,
465 ),
466 batch_size=batch_size,
467 N_iterations=3,
468 )
469
470

Callers

nothing calls this directly

Calls 5

RandomDataIteratorClass · 0.90
compare_pipelinesFunction · 0.90
SliceArgsIteratorClass · 0.70

Tested by

no test coverage detected