85426e4964fb6ee30ca5b14c5c79f4843e948962,memcnn/models/tests/test_revop.py,,test_revblock_chained,#,133

Before Change


    Xin = X.clone()
    Y = rb(Xin)

    loss = torch.nn.MSELoss()(Y, Ytarget)

    optim.zero_grad()
    loss.backward()
    optim.step()


@pytest.mark.parametrize("coupling", ["additive", "affine"])
def test_revblock_simple_inverse(coupling):

After Change


        Xin = X.clone()
        Y = rb(Xin)

        loss = torch.nn.MSELoss()(Y, Ytarget)

        optim.zero_grad()
        loss.backward()
        optim.step()

    assert not torch.isnan(loss)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: silvandeleemput/memcnn
Commit Name: 85426e4964fb6ee30ca5b14c5c79f4843e948962
Time: 2019-12-12
Author: silvandeleemput@gmail.com
File Name: memcnn/models/tests/test_revop.py
Class Name:
Method Name: test_revblock_chained


Project Name: leftthomas/SRGAN
Commit Name: ba2b155180da96d3b274ca95128e44872d1798f3
Time: 2017-12-05
Author: leftthomas@qq.com
File Name: train.py
Class Name:
Method Name:


Project Name: silvandeleemput/memcnn
Commit Name: ca078e83147f95ec7df149ef5eea9b6a8424d3bf
Time: 2019-12-12
Author: silvandeleemput@gmail.com
File Name: memcnn/models/tests/test_memory_saving.py
Class Name:
Method Name: test_memory_saving


Project Name: hunkim/PyTorchZeroToAll
Commit Name: c4610ff26a01a0622bc11dcac0f0812f05c56e0c
Time: 2017-11-02
Author: hunkim@gmail.com
File Name: 12_4_name_classify.py
Class Name:
Method Name: train