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

Function multi_per_sample_compare

dali/test/python/operator_2/test_python_function.py:370–378  ·  view source on GitHub ↗
(func, pipe, pyfunc_pipe)

Source from the content-addressed store, hash-verified

368
369
370def multi_per_sample_compare(func, pipe, pyfunc_pipe):
371 for it in range(ITERS):
372 preprocessed_output1, preprocessed_output2 = pipe.run()
373 out1, out2, out3 = pyfunc_pipe.run()
374 for i in range(BATCH_SIZE):
375 pro1, pro2, pro3 = func(preprocessed_output1.at(i), preprocessed_output2.at(i))
376 assert numpy.array_equal(out1.at(i), pro1)
377 assert numpy.array_equal(out2.at(i), pro2)
378 assert numpy.array_equal(out3.at(i), pro3)
379
380
381def multi_batch_compare(func, pipe, pyfunc_pipe):

Callers

nothing calls this directly

Calls 3

funcFunction · 0.70
runMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected