47ba6dedb917847460b098c5f2b776a4c8bd0c1b,torchdiffeq/_impl/adjoint.py,,odeint_adjoint,#Any#Any#Any#,168

Before Change


    shapes, func, y0, t, rtol, atol, method, options, event_fn, decreasing_time = _check_inputs(func, y0, t, rtol, atol, method, options, event_fn, SOLVERS)

    if "norm" in options and "norm" not in adjoint_options:
        adjoint_shapes = [torch.Size(()), y0.shape, y0.shape] + [torch.Size([sum(param.numel() for param in adjoint_params)])]
        adjoint_options["norm"] = _wrap_norm([_rms_norm, options["norm"], options["norm"]], adjoint_shapes)

    ans = OdeintAdjointMethod.apply(shapes, func, y0, t, rtol, atol, method, options, event_fn, adjoint_rtol, adjoint_atol,
                                    adjoint_method, adjoint_options, t.requires_grad, *adjoint_params)

After Change


    for p in adjoint_params:
        if not p.requires_grad:
            // Issue a warning if a user-specified norm is specified.
            if "norm" in adjoint_options and adjoint_options["norm"] != "seminorm":
                warnings.warn("An adjoint parameter was passed without requiring gradient. For efficiency this will be "
                              "excluded from the adjoint pass, and will not appear as a tensor in the adjoint norm.")

    adjoint_params = tuple(p for p in adjoint_params if p.requires_grad)

    // Normalise to non-tupled state.
    shapes, func, y0, t, rtol, atol, method, options, event_fn, decreasing_time = _check_inputs(func, y0, t, rtol, atol, method, options, event_fn, SOLVERS)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: rtqichen/torchdiffeq
Commit Name: 47ba6dedb917847460b098c5f2b776a4c8bd0c1b
Time: 2021-01-05
Author: rtqichen@gmail.com
File Name: torchdiffeq/_impl/adjoint.py
Class Name:
Method Name: odeint_adjoint


Project Name: cornellius-gp/gpytorch
Commit Name: 2185f24dda7b33194d4240b2a6301230ce1cd7f5
Time: 2019-04-02
Author: jake.gardner@uber.com
File Name: gpytorch/kernels/spectral_mixture_kernel.py
Class Name: SpectralMixtureKernel
Method Name: __init__


Project Name: cornellius-gp/gpytorch
Commit Name: 418f0445cd4baa9457fc23361803ae3c3a32a336
Time: 2020-06-11
Author: kaw293@cornell.edu
File Name: gpytorch/kernels/rff_kernel.py
Class Name: RFFKernel
Method Name: __init__