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

def test_construct_single_anchor_grid(self):

    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]]
    base_anchor_size = tf.constant([256, 256], dtype=tf.float32)
    box_specs_list = [[(0.5, 0.25), (1.0, 0.25), (2.0, 0.25), (0.5, 1.0), (1.0, 1.0), (2.0, 1.0), (0.5, 4.0), (1.0, 4.0), (2.0, 4.0)]]
    anchor_generator = ag.MultipleGridAnchorGenerator(box_specs_list, base_anchor_size)
    anchors = anchor_generator.generate(feature_map_shape_list=[(1, 1)], anchor_strides=[(16, 16)], anchor_offsets=[(7, (-3))])
    anchor_corners = anchors.get()
    with self.test_session():
        anchor_corners_out = anchor_corners.eval()
        self.assertAllClose(anchor_corners_out, exp_anchor_corners)
