'Builds a 1x1 anchor grid to test the size of the output boxes.'

def test_construct_single_anchor(self):

    scales = [0.5, 1.0, 2.0]
    aspect_ratios = [0.25, 1.0, 4.0]
    anchor_offset = [7, (-3)]
    exp_anchor_corners = [[(-121), (-35), 135, 29], [(-249), (-67), 263, 61], [(-505), (-131), 519, 125], [(-57), (-67), 71, 61], [(-121), (-131), 135, 125], [(-249), (-259), 263, 253], [(-25), (-131), 39, 125], [(-57), (-259), 71, 253], [(-121), (-515), 135, 509]]
    anchor_generator = grid_anchor_generator.GridAnchorGenerator(scales, aspect_ratios, anchor_offset=anchor_offset)
    anchors = anchor_generator.generate(feature_map_shape_list=[(1, 1)])
    anchor_corners = anchors.get()
    with self.test_session():
        anchor_corners_out = anchor_corners.eval()
        self.assertAllClose(anchor_corners_out, exp_anchor_corners)
