42be5ed1d076e00cd5cbb85f1cb0062ac81dfa19,thinc/layers/pytorchwrapper.py,,forward,#,51

Before Change


    Return the output of the wrapped PyTorch model for the given input,
    along with a callback to handle the backward pass.
    
    convert_inputs = model.get_attr("convert_inputs") or _convert_inputs
    convert_outputs = model.get_attr("convert_outputs") or _convert_outputs

    Xtorch, get_dX = convert_inputs(model, X, is_train)

After Change


    Return the output of the wrapped PyTorch model for the given input,
    along with a callback to handle the backward pass.
    
    convert_inputs = model.get_attr("convert_inputs")
    convert_outputs = model.get_attr("convert_outputs")

    Xtorch, get_dX = convert_inputs(model, X, is_train)
    Ytorch, torch_backprop = model.shims[0](Xtorch, is_train)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: explosion/thinc
Commit Name: 42be5ed1d076e00cd5cbb85f1cb0062ac81dfa19
Time: 2020-01-12
Author: honnibal+gh@gmail.com
File Name: thinc/layers/pytorchwrapper.py
Class Name:
Method Name: forward


Project Name: explosion/thinc
Commit Name: c638823db4caa6c562423903807b5eac652b2e23
Time: 2020-01-24
Author: honnibal+gh@gmail.com
File Name: thinc/layers/staticvectors.py
Class Name:
Method Name: forward