7391aec984c1e9e0899d51e6b0538483c37ec8fb,torchdiffeq/_impl/adjoint.py,,odeint_adjoint,#,115

Before Change



        tensor_input = True
        y0 = (y0,)
        func = TupleFunc(func)

    params = tuple(func.parameters())
    if adjoint_buffers:
        params = params + tuple(buffer for buffer in func.buffers() if buffer.requires_grad)
    n_tensors = len(y0)

    ys = OdeintAdjointMethod.apply(func, t, rtol, atol, method, options, adjoint_rtol, adjoint_atol, adjoint_method,
                                   adjoint_options, n_tensors, *params, *y0)

    if tensor_input:
        ys = ys[0]
    return ys

After Change


                                         adjoint_method, adjoint_options, t.requires_grad, *adjoint_params)

    if not tensor_input:
        solution = _flat_to_shape(solution, tuple([len(t), *shape] for shape in shapes))
    return solution
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: rtqichen/torchdiffeq
Commit Name: 7391aec984c1e9e0899d51e6b0538483c37ec8fb
Time: 2020-07-27
Author: 33688385+patrick-kidger@users.noreply.github.com
File Name: torchdiffeq/_impl/adjoint.py
Class Name:
Method Name: odeint_adjoint


Project Name: explosion/thinc
Commit Name: 6799144620411f23c3a15abae1f78c5bc2a4f7c0
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/ops.py
Class Name: Ops
Method Name: pad


Project Name: DistrictDataLabs/yellowbrick
Commit Name: ca14cf72e3e4bd3a6136cafad8701ac41f48f09b
Time: 2018-08-25
Author: davidwaterman@gmail.com
File Name: yellowbrick/cluster/elbow.py
Class Name: KElbowVisualizer
Method Name: __init__