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

Method __init__

tensorpack/dataflow/imgaug/crop.py:20–28  ·  view source on GitHub ↗

Args: crop_shape: (h, w), int or a tuple of int

(self, crop_shape)

Source from the content-addressed store, hash-verified

18 """ Randomly crop the image into a smaller one """
19
20 def __init__(self, crop_shape):
21 """
22 Args:
23 crop_shape: (h, w), int or a tuple of int
24 """
25 crop_shape = shape2d(crop_shape)
26 crop_shape = (int(crop_shape[0]), int(crop_shape[1]))
27 super(RandomCrop, self).__init__()
28 self._init(locals())
29
30 def get_transform(self, img):
31 orig_shape = img.shape

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

shape2dFunction · 0.85
_initMethod · 0.45

Tested by

no test coverage detected