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

Function run_case

dali/test/python/operator_2/test_python_function.py:195–202  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

193
194
195def run_case(func):
196 pipe = BasicPipeline(BATCH_SIZE, NUM_WORKERS, DEVICE_ID, SEED, images_dir)
197 pyfunc_pipe = PythonOperatorPipeline(BATCH_SIZE, NUM_WORKERS, DEVICE_ID, SEED, images_dir, func)
198 for it in range(ITERS):
199 (preprocessed_output,) = pipe.run()
200 (output,) = pyfunc_pipe.run()
201 for i in range(len(output)):
202 assert numpy.array_equal(output.at(i), func(preprocessed_output.at(i)))
203
204
205def one_channel_normalize(image):

Calls 5

BasicPipelineClass · 0.70
funcFunction · 0.70
runMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected