def __init__(self, batch_size, num_threads, device_id): super(SimplePipeline, self).__init__(batch_size, num_threads, device_id, seed=12) self.input = ops.FileReader(file_root=image_dir) self.decode = ops.ImageDecoder(device='cpu', output_type=types.RGB) self.custom = ops.CustomDummy(fn_ptr=hello_cfunc.address)
def __init__(self, batch_size, num_threads, device_id): super(CustomPipeline, self).__init__(batch_size, num_threads, device_id) self.inputs = ops.ExternalSource() self.custom_dummy = ops.CustomDummy(device="gpu")