'Decodes a batch of box encodings with respect to the anchors.
Args:
box_encodings: A float32 tensor of shape
[batch_size, num_anchors, box_code_size] containing box encodings.
Returns:
decoded_boxes: A float32 tensor of shape
[batch_size, num_anchors, 4] containing the decoded boxes.'

def _batch_decode(self, box_encodings):

    combined_shape = shape_utils.combined_static_and_dynamic_shape(box_encodings)
    batch_size = combined_shape[0]
    tiled_anchor_boxes = tf.tile(tf.expand_dims(self.anchors.get(), 0), [batch_size, 1, 1])
    tiled_anchors_boxlist = box_list.BoxList(tf.reshape(tiled_anchor_boxes, [(-1), self._box_coder.code_size]))
    decoded_boxes = self._box_coder.decode(tf.reshape(box_encodings, [(-1), self._box_coder.code_size]), tiled_anchors_boxlist)
    return tf.reshape(decoded_boxes.get(), tf.stack([combined_shape[0], combined_shape[1], 4]))
