def METHOD_NAME(self):
    cfg = get_cfg()
    cfg.label_smoothing = 0.5
    model = MTEncDecModel(cfg=cfg)
    assert isinstance(model, MTEncDecModel)
    batch_size = 10
    time = 32
    vocab_size = 32000
    torch.manual_seed(42)
    tgt_ids = torch.LongTensor(batch_size, time).random_(1, model.decoder_tokenizer.vocab_size)
    logits = torch.FloatTensor(batch_size, time, vocab_size).random_(-1, 1)
    log_probs = torch.nn.functional.log_softmax(logits, dim=-1)
    train_loss = model.loss_fn(log_probs=log_probs, labels=tgt_ids)
    eval_loss = model.eval_loss_fn(log_probs=log_probs, labels=tgt_ids)
    assert not torch.allclose(train_loss, eval_loss)  # , (train_loss, eval_loss)
    cfg.label_smoothing = 0
    model = MTEncDecModel(cfg=cfg)
    # Train loss == val loss when label smoothing = 0
    train_loss = model.loss_fn(log_probs=log_probs, labels=tgt_ids)
    eval_loss = model.eval_loss_fn(log_probs=log_probs, labels=tgt_ids)
    assert torch.allclose(train_loss, eval_loss)