677e510defc66f33a7e6cfd3c4289c745ebe1964,tests/links_tests/readout_tests/test_set2set.py,,check_backward,#,57

Before Change


        atom_data:
        y_grad:
    
    atom = chainer.Variable(atom_data)
    readout.reset_state()
    y = readout(atom)
    y.grad = y_grad
    y.backward()

    def f():
        readout.reset_state()
        return readout(atom_data).data,

    gx, = gradient_check.numerical_grad(f, (atom.data, ), (y.grad, ))
    numpy.testing.assert_allclose(cuda.to_cpu(gx), cuda.to_cpu(atom.grad),
                                  atol=1e-2, rtol=1e-2)

After Change


        readout.reset_state()
        return readout(atom_data),

    gradient_check.check_backward(
        f, (atom_data), y_grad, atol=1e-1, rtol=1e-1)

    // gx, = gradient_check.numerical_grad(f, (atom.data, ), (y.grad, ))
    // numpy.testing.assert_allclose(cuda.to_cpu(gx), cuda.to_cpu(atom.grad),
    //                               atol=1e-2, rtol=1e-2)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 20

Instances


Project Name: pfnet-research/chainer-chemistry
Commit Name: 677e510defc66f33a7e6cfd3c4289c745ebe1964
Time: 2019-08-14
Author: acc1ssnn9terias@gmail.com
File Name: tests/links_tests/readout_tests/test_set2set.py
Class Name:
Method Name: check_backward


Project Name: pfnet-research/chainer-chemistry
Commit Name: 677e510defc66f33a7e6cfd3c4289c745ebe1964
Time: 2019-08-14
Author: acc1ssnn9terias@gmail.com
File Name: tests/links_tests/update_tests/test_ggnn_update.py
Class Name:
Method Name: check_backward


Project Name: pfnet-research/chainer-chemistry
Commit Name: 677e510defc66f33a7e6cfd3c4289c745ebe1964
Time: 2019-08-14
Author: acc1ssnn9terias@gmail.com
File Name: tests/links_tests/readout_tests/test_set2set.py
Class Name:
Method Name: check_backward


Project Name: pfnet-research/chainer-chemistry
Commit Name: 677e510defc66f33a7e6cfd3c4289c745ebe1964
Time: 2019-08-14
Author: acc1ssnn9terias@gmail.com
File Name: tests/links_tests/update_tests/test_mpnn_update.py
Class Name:
Method Name: check_backward