def _flip_tags(self,
                   tags: Tensor,
                   flip_indices: List[int],
                   shift_heatmap: bool = True):
        """Flip the tagging heatmaps horizontally for test-time augmentation.

        Args:
            tags (Tensor): batched tagging heatmaps to flip
            flip_indices (List[int]): The indices of each keypoint's symmetric
            keypoint
            shift_heatmap (bool): Shift the flipped heatmaps to align with the
            original heatmaps and improve accuracy. Defaults to ``True``

        Returns:
            Tensor: flipped tagging heatmaps
        """
        B, C, H, W = tags.shape
        K = self.num_keypoints
        L = self.tag_dim

        tags = tags.flip(-1)

        if self.tag_per_keypoint:
            assert C == K * L
            tags = tags.view(B, L, K, H, W)
            tags = tags[:, :, flip_indices]
            tags = tags.view(B, C, H, W)

        if shift_heatmap:
            tags[..., 1:] = tags[..., :-1].clone()

        return tags
Flip the tagging heatmaps horizontally for test-time augmentation.

        Args:
            tags (Tensor): batched tagging heatmaps to flip
            flip_indices (List[int]): The indices of each keypoint's symmetric
            keypoint
            shift_heatmap (bool): Shift the flipped heatmaps to align with the
            original heatmaps and improve accuracy. Defaults to ``True``

        Returns:
            Tensor: flipped tagging heatmaps
        
mmpose/mmpose/models/heads/heatmap_heads/ae_head.py