import torch


def calc_metrics(out, trg) -> torch.Tensor:
    """
    Calculates the metrics necessary to evaluate how good the model is.

    For now, it has two zeros as placeholders.

    :param out: output of the model.
    :param trg: target translation.
    :return: number of tokens, number of correct tokens, placeholder, placeholder
    """
    words = torch.Tensor([trg.shape[0] * trg.shape[1]])
    _, decisions = torch.max(out, dim=2)
    correct = torch.sum(decisions == trg).view((-1,))
    return torch.cat((words, correct, torch.zeros(2)))