e4554604dca45529bebc03c8869fdeaeeb825132,tests/ignite/metrics/test_loss.py,,test_non_averaging_loss,#,48

Before Change


def test_non_averaging_loss():
    loss = Loss(nn.NLLLoss(reduction="none"))

    y_pred = torch.tensor([[0.1, 0.4, 0.5], [0.1, 0.7, 0.2]]).log()
    y = torch.tensor([2, 2]).long()
    with pytest.raises(ValueError):
        loss.update((y_pred, y))

After Change


def test_non_averaging_loss():
    loss = Loss(nn.NLLLoss(reduction="none"))

    y_pred, y, _ = y_test_1()
    with pytest.raises(ValueError):
        loss.update((y_pred, y))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: pytorch/ignite
Commit Name: e4554604dca45529bebc03c8869fdeaeeb825132
Time: 2021-03-12
Author: momo.ah.yakoub@gmail.com
File Name: tests/ignite/metrics/test_loss.py
Class Name:
Method Name: test_non_averaging_loss


Project Name: pytorch/ignite
Commit Name: e4554604dca45529bebc03c8869fdeaeeb825132
Time: 2021-03-12
Author: momo.ah.yakoub@gmail.com
File Name: tests/ignite/metrics/test_loss.py
Class Name:
Method Name: test_kwargs_loss


Project Name: pytorch/ignite
Commit Name: e4554604dca45529bebc03c8869fdeaeeb825132
Time: 2021-03-12
Author: momo.ah.yakoub@gmail.com
File Name: tests/ignite/metrics/test_loss.py
Class Name:
Method Name: test_non_averaging_loss


Project Name: pytorch/ignite
Commit Name: e4554604dca45529bebc03c8869fdeaeeb825132
Time: 2021-03-12
Author: momo.ah.yakoub@gmail.com
File Name: tests/ignite/metrics/test_loss.py
Class Name:
Method Name: test_sum_detached