Exemple #1
0
 def pipe_no_input(max_batch_size, input_data, device):
     pipe = Pipeline(batch_size=max_batch_size, num_threads=4, device_id=0)
     data = fn.external_source(source=input_data,
                               cycle=False,
                               device=device)
     dist = data + fn.normal_distribution()
     pipe.set_outputs(dist)
     return pipe
Exemple #2
0
 def noise_fn(self, img):
     img_noised = img + fn.normal_distribution(img, stddev=fn.uniform(range=(0.0, 0.33)))
     return self.random_augmentation(0.15, img_noised, img)