def __init__(self, anchors, shape, sigma=0.5, randrange=None):
        """
        :param anchors: in [0,1] coordinate
        :param shape: image shape in [h, w]
        :param sigma: sigma for Gaussian weight
        :param randrange: default to shape[0] / 8
        """
        logger.warn("GaussianDeform is slow. Consider using it with 4 or more prefetching processes.")
        super(GaussianDeform, self).__init__()
        self.anchors = anchors
        self.K = len(self.anchors)
        self.shape = shape
        self.grid = np.mgrid[0:self.shape[0], 0:self.shape[1]].transpose(1,2,0)
        self.grid = self.grid.astype('float32') # HxWx2

        gm = GaussianMap(self.shape, sigma=sigma)
        self.gws = np.array([gm.get_gaussian_weight(ank)
                             for ank in self.anchors], dtype='float32') # KxHxW
        self.gws = self.gws.transpose(1, 2, 0)  #HxWxK
        if randrange is None:
            self.randrange = 8 / self.shape[0]
        else:
            self.randrange = randrange
dataset/ETHPy150Open ppwwyyxx/tensorpack/tensorpack/dataflow/imgaug/deform.py/GaussianDeform.__init__/swapped operands of `/`