MCPcopy Create free account
hub / github.com/tensorpack/tensorpack / __init__

Method __init__

tensorpack/dataflow/imgaug/imgproc.py:52–60  ·  view source on GitHub ↗

Args: delta (float): Randomly add a value within [-delta,delta] clip (bool): clip results to [0,255] even when data type is not uint8.

(self, delta, clip=True)

Source from the content-addressed store, hash-verified

50 Adjust brightness by adding a random number.
51 """
52 def __init__(self, delta, clip=True):
53 """
54 Args:
55 delta (float): Randomly add a value within [-delta,delta]
56 clip (bool): clip results to [0,255] even when data type is not uint8.
57 """
58 super(Brightness, self).__init__()
59 assert delta > 0
60 self._init(locals())
61
62 def _get_augment_params(self, _):
63 return self._rand_range(-self.delta, self.delta)

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
_initMethod · 0.45

Tested by

no test coverage detected