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.)
| 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): |