85426e4964fb6ee30ca5b14c5c79f4843e948962,memcnn/models/tests/test_revop.py,,test_normal_vs_revblock,#,215

Before Change


            e.train()

        // define an arbitrary reversible function and define graph for model 1
        Xin = X.clone()
        fn = ReversibleBlock(c1_2, c2_2, keep_input=False, coupling=coupling, adapter=AffineAdapterNaive,
                                   implementation_fwd=implementation_fwd, implementation_bwd=implementation_bwd)
        Y = fn.forward(Xin)
        loss2 = torch.mean(Y)

        // define the reversible function without custom backprop and define graph for model 2
        XX = X.clone().data

After Change


            e.train()

        // define an arbitrary reversible function and define graph for model 1
        Xin = X.clone().requires_grad_()
        fn = ReversibleBlock(c1_2, c2_2, keep_input=False, coupling=coupling, adapter=AffineAdapterNaive,
                                   implementation_fwd=implementation_fwd, implementation_bwd=implementation_bwd)
        Y = fn.forward(Xin)
        loss2 = torch.mean(Y)

        // define the reversible function without custom backprop and define graph for model 2
        XX = X.clone().detach().requires_grad_()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

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_normal_vs_revblock


Project Name: PIQuIL/QuCumber
Commit Name: 10bdd46d76d35cfba3a484b007ea3e14af801813
Time: 2019-12-09
Author: emerali@users.noreply.github.com
File Name: qucumber/rbm/purification_rbm.py
Class Name: PurificationRBM
Method Name: gibbs_steps


Project Name: modAL-python/modAL
Commit Name: 2927cfee30239273c0098370b3be54725f10563a
Time: 2018-11-30
Author: theodore.danka@gmail.com
File Name: modAL/expected_error.py
Class Name:
Method Name: expected_error_reduction