0dea0d6035a4623f46723379a9944ec50e4322ae,imgaug/augmenters/arithmetic.py,Add,__init__,#Add#Any#Any#Any#Any#Any#,96
Before Change
raise Exception("Expected float or int, tuple/list with 2 entries or StochasticParameter. Got %s." % (type(value),))
if per_channel in [True, False, 0, 1, 0.0, 1.0]:
self.per_channel = Deterministic(int(per_channel))
elif ia.is_single_number(per_channel):
ia.do_assert(0 <= per_channel <= 1.0, "Expected bool, or number in range [0, 1.0] for per_channel, got %s." % (type(per_channel),))
self.per_channel = Binomial(per_channel)
else:
After Change
deterministic=False, random_state=None):
super(Add, self).__init__(name=name, deterministic=deterministic, random_state=random_state)
self.value = iap.handle_discrete_param(value, "value", value_range=(-255, 255), tuple_to_uniform=True, list_to_choice=True, allow_floats=False)
self.per_channel = iap.handle_probability_param(per_channel, "per_channel")
def _augment_images(self, images, random_state, parents, hooks):
input_dtypes = meta.copy_dtypes_for_restore(images, force_list=True)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: aleju/imgaug
Commit Name: 0dea0d6035a4623f46723379a9944ec50e4322ae
Time: 2018-08-30
Author: kontakt@ajung.name
File Name: imgaug/augmenters/arithmetic.py
Class Name: Add
Method Name: __init__
Project Name: aleju/imgaug
Commit Name: bd78a12c75a46957aebcf31ec9e78f5699f22d1f
Time: 2018-09-01
Author: kontakt@ajung.name
File Name: imgaug/augmenters/blur.py
Class Name: MedianBlur
Method Name: __init__
Project Name: aleju/imgaug
Commit Name: f417d3d3d16d9d1f5c535be9baa5363913c4c09a
Time: 2018-08-30
Author: kontakt@ajung.name
File Name: imgaug/augmenters/arithmetic.py
Class Name: AddElementwise
Method Name: __init__