537e5b549a9c4eeb3fe2776028b553ef36fadd88,rnns/fastrnns/test.py,,test_rnns,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,27

Before Change


    control_output = control_outputs[0]
    experim_output = experim_outputs[0]
    grad = torch.randn_like(control_output)
    control_grads = torch.autograd.grad([control_output], control_params, grad)
    experim_grads = torch.autograd.grad([experim_output], experim_params, grad)
    assertEqual(experim_grads, control_grads)

After Change



    print("Checking outputs...")
    control_outputs = control.forward(*control.inputs)
    experim_outputs = experim.forward(*experim.inputs)
    assertEqual(experim_outputs, control_outputs)

    print("Checking grads...")
    assert control.backward_setup is not None
    assert experim.backward_setup is not None
    assert control.backward is not None
    assert experim.backward is not None
    control_backward_inputs = control.backward_setup(control_outputs, seed)
    experim_backward_inputs = experim.backward_setup(experim_outputs, seed)

    control.backward(*control_backward_inputs)
    experim.backward(*experim_backward_inputs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: pytorch/benchmark
Commit Name: 537e5b549a9c4eeb3fe2776028b553ef36fadd88
Time: 2018-12-27
Author: zou3519@gmail.com
File Name: rnns/fastrnns/test.py
Class Name:
Method Name: test_rnns


Project Name: pytorch/text
Commit Name: 8f3ab86f66f135588ca923ea90c68f3dec10d1fa
Time: 2020-06-03
Author: nayef.ahmed211@gmail.com
File Name: test/data/test_functional.py
Class Name: TestFunctional
Method Name: test_RegexTokenizer


Project Name: rail-berkeley/softlearning
Commit Name: 49c887e9208d2a0119eba2a26e38d033bb2ba4da
Time: 2018-05-22
Author: kristian.hartikainen@gmail.com
File Name: sac/policies/real_nvp.py
Class Name: RealNVPPolicy
Method Name: __init__


Project Name: apache/incubator-mxnet
Commit Name: a37dcd46cba88dfd0478b601fb8fbf9b425780c0
Time: 2019-11-07
Author: anirudh2290@ufl.edu
File Name: example/automatic-mixed-precision/amp_model_conversion.py
Class Name:
Method Name:


Project Name: silvandeleemput/memcnn
Commit Name: 98e790696877d8065842d83f1819ae9c989a8c98
Time: 2018-06-06
Author: sil.vandeleemput@radboudumc.nl
File Name: memcnn/models/revop.py
Class Name: ReversibleBlockFunction
Method Name: backward