fe4e8ad9ba8e1e9d44b972802a97d62997dddbf3,imgaug/augmenters/size.py,CropAndPad,__init__,#CropAndPad#Any#Any#Any#Any#Any#Any#Any#Any#Any#,503
Before Change
raise Exception("Expected pad_mode to be ia.ALL or string or list of strings or StochasticParameter, got %s." % (type(pad_mode),))
if ia.is_single_number(pad_cval):
self.pad_cval = Deterministic(pad_cval)
elif isinstance(pad_cval, tuple):
ia.do_assert(len(pad_cval) == 2)
if ia.is_single_float(pad_cval[0]) or ia.is_single_float(pad_cval[1]):
self.pad_cval = Uniform(pad_cval[0], pad_cval[1])
else:
self.pad_cval = DiscreteUniform(pad_cval[0], pad_cval[1])
elif isinstance(pad_cval, list):
ia.do_assert(all([ia.is_single_number(v) for v in pad_cval]))
self.pad_cval = Choice(pad_cval)
elif isinstance(pad_cval, StochasticParameter):
self.pad_cval = pad_cval
else:
raise Exception("Expected pad_cval to be int or float or tuple of two ints/floats or list of ints/floats or StochasticParameter, got %s." % (type(pad_cval),))
self.keep_size = keep_size
self.sample_independently = sample_independently
After Change
else:
raise Exception("Expected pad_mode to be ia.ALL or string or list of strings or StochasticParameter, got %s." % (type(pad_mode),))
self.pad_cval = iap.handle_discrete_param(pad_cval, "pad_cval", value_range=(0, 255), tuple_to_uniform=True, list_to_choice=True, allow_floats=True)
self.keep_size = keep_size
self.sample_independently = sample_independently
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 21
Instances
Project Name: aleju/imgaug
Commit Name: fe4e8ad9ba8e1e9d44b972802a97d62997dddbf3
Time: 2018-09-01
Author: kontakt@ajung.name
File Name: imgaug/augmenters/size.py
Class Name: CropAndPad
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__
Project Name: aleju/imgaug
Commit Name: fe4e8ad9ba8e1e9d44b972802a97d62997dddbf3
Time: 2018-09-01
Author: kontakt@ajung.name
File Name: imgaug/augmenters/size.py
Class Name: CropAndPad
Method Name: __init__
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__