71ecdbadb8a5712966535dd6bfe843f78ac1db91,torchdiffeq/_impl/adjoint.py,OdeintAdjointMethod,backward,#,25

Before Change


        with torch.no_grad():
            adj_y = tuple(grad_output_[-1] for grad_output_ in grad_output)
            adj_params = torch.zeros_like(flat_params)
            adj_time = torch.tensor(0.)
            time_vjps = []
            for i in range(T - 1, 0, -1):

                ans_i = tuple(ans_[i] for ans_ in ans)

After Change


                // Run the augmented system backwards in time.
                // TODO: switch this out to just not have an adj_params bit
                if adj_params.numel() == 0:
                    adj_params = torch.zeros((), dtype=adj_y[0].dtype, device=adj_y[0].device)
                aug_y0 = (*ans_i, *adj_y, adj_time, adj_params)
                aug_ans = odeint(
                    augmented_dynamics, aug_y0,
                    t[i - 1:i + 1].flip(0),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: rtqichen/torchdiffeq
Commit Name: 71ecdbadb8a5712966535dd6bfe843f78ac1db91
Time: 2020-07-25
Author: 33688385+patrick-kidger@users.noreply.github.com
File Name: torchdiffeq/_impl/adjoint.py
Class Name: OdeintAdjointMethod
Method Name: backward


Project Name: rusty1s/pytorch_geometric
Commit Name: b2002a8ef80ecbecee09fd61b910c987648455c7
Time: 2020-08-26
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/karate.py
Class Name: KarateClub
Method Name: __init__


Project Name: mariogeiger/se3cnn
Commit Name: d9c24dfc42d3af7859d98fa237d665e18e0f5c9a
Time: 2019-10-05
Author: lapchevsky.k@gmail.com
File Name: se3cnn/util/dataset/crystals.py
Class Name: CrystalCIF
Method Name: preprocess