MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / __init__

Method __init__

tensorpack/dataflow/imgaug/crop.py:142–151  ·  view source on GitHub ↗

Args: h_range (int or tuple): the height of rectangle to cut. If a tuple, will randomly sample from this range [low, high) w_range (int or tuple): similar to above fill (float): the fill value

(self, h_range, w_range, fill=0.)

Source from the content-addressed store, hash-verified

140 The cutout augmentation, as described in https://arxiv.org/abs/1708.04552
141 """
142 def __init__(self, h_range, w_range, fill=0.):
143 """
144 Args:
145 h_range (int or tuple): the height of rectangle to cut.
146 If a tuple, will randomly sample from this range [low, high)
147 w_range (int or tuple): similar to above
148 fill (float): the fill value
149 """
150 super(RandomCutout, self).__init__()
151 self._init(locals())
152
153 def _get_cutout_shape(self):
154 if isinstance(self.h_range, int):

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
_initMethod · 0.45

Tested by

no test coverage detected