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

Class CommonPipeline

dali/test/python/operator_2/test_python_function.py:52–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50
51
52class CommonPipeline(Pipeline):
53 def __init__(
54 self, batch_size, num_threads, device_id, _seed, image_dir, prefetch_queue_depth=2
55 ):
56 super().__init__(
57 batch_size,
58 num_threads,
59 device_id,
60 seed=_seed,
61 prefetch_queue_depth=prefetch_queue_depth,
62 )
63 self.input = ops.readers.File(file_root=image_dir)
64 self.decode = ops.decoders.Image(device="cpu", output_type=types.RGB)
65 self.resize = ops.PythonFunction(function=resize, output_layouts="HWC")
66
67 def load(self):
68 jpegs, labels = self.input()
69 decoded = self.decode(jpegs)
70 resized = self.resize(decoded)
71 return resized, labels
72
73 def define_graph(self):
74 pass
75
76
77class BasicPipeline(CommonPipeline):

Callers 1

test_output_layoutFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_output_layoutFunction · 0.56