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

Function pipeline

dali/test/python/conditionals/test_nests.py:64–72  ·  view source on GitHub ↗
(unpacking_select)

Source from the content-addressed store, hash-verified

62
63 @pipeline_def(enable_conditionals=True, num_threads=4, batch_size=8, device_id=0)
64 def pipeline(unpacking_select):
65 image = types.Constant(np.full((200, 300, 3), 42, dtype=np.uint8), device="cpu")
66 label = types.Constant(np.array(1), device="cpu")
67 ops = [rotate, color]
68 op_idx = fn.random.uniform(values=list(range(len(ops))))
69 image, label = select(
70 ops, op_idx, image=image, label=label, unpacking_select=unpacking_select
71 )
72 return image, label
73
74 pipe_unpacking = pipeline(unpacking_select=True)
75 pipe_unpacking.run()

Callers 4

test_select_implsFunction · 0.70
test_dictsFunction · 0.70
test_tuplesFunction · 0.70
test_nesting_errorFunction · 0.70

Calls 2

ConstantMethod · 0.80
selectFunction · 0.70

Tested by

no test coverage detected