def METHOD_NAME(self, grid_sizes):
    anchors = []
    for size, stride, base_anchors in zip(grid_sizes, self.strides,
                                          self.cell_anchors):
        shift_x, shift_y = self._create_grid_offsets(size, stride,
                                                     self.offset)
        shifts = paddle.stack((shift_x, shift_y, shift_x, shift_y), axis=1)
        shifts = paddle.reshape(shifts, [-1, 1, 4])
        base_anchors = paddle.reshape(base_anchors, [1, -1, 4])
        anchors.append(paddle.reshape(shifts + base_anchors, [-1, 4]))
    return anchors