def METHOD_NAME(self, outputs: torch.Tensor,
            data_samples: Sequence[TextRecogDataSample]) -> Dict:
    """
    Args:
        outputs (Tensor): A raw logit tensor of shape :math:`(N, T, C)`.
        data_samples (list[TextRecogDataSample]): List of
            ``TextRecogDataSample`` which are processed by ``get_target``.
    Returns:
        dict: A loss dict with the key ``loss_ce``.
    """
    targets = list()
    for data_sample in data_samples:
        targets.append(data_sample.gt_text.padded_indexes)
    targets = torch.stack(targets, dim=0).long()
    if self.ignore_first_char:
        targets = targets[:, 1:].contiguous()
        outputs = outputs[:, :-1, :].contiguous()
    if self.flatten:
        outputs = outputs.view(-1, outputs.size(-1))
        targets = targets.view(-1)
    else:
        outputs = outputs.permute(0, 2, 1).contiguous()
    loss_ce = self.loss_ce(outputs, targets.to(outputs.device))
    losses = dict(loss_ce=loss_ce)
    return losses