88edea32e8526e13c01668aa3b00843d0ced6288,tests/estimators/classification/test_deeplearning_common.py,,test_loss_gradient_amp,#Any#Any#Any#Any#Any#,514

Before Change



    // First test of gradients
    sub_gradients = gradients[0, 0, :, 14]
    print("sub_gradients1", sub_gradients)
    np.testing.assert_array_almost_equal(
        sub_gradients, expected_gradients_1[0], decimal=expected_gradients_1[1],
    )

After Change


    gradients = classifier.loss_gradient_framework(
        torch.tensor(x_test_mnist).to(classifier.device), torch.tensor(y_test_mnist).to(classifier.device)
    )
    gradients = gradients.cpu().numpy()

    // Test shape
    assert gradients.shape == (x_test_mnist.shape[0],) + mnist_shape
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 88edea32e8526e13c01668aa3b00843d0ced6288
Time: 2020-09-23
Author: M.N.Tran@ibm.com
File Name: tests/estimators/classification/test_deeplearning_common.py
Class Name:
Method Name: test_loss_gradient_amp


Project Name: hunkim/PyTorchZeroToAll
Commit Name: c4610ff26a01a0622bc11dcac0f0812f05c56e0c
Time: 2017-11-02
Author: hunkim@gmail.com
File Name: 12_4_name_classify.py
Class Name: RNNClassifier
Method Name: forward


Project Name: MVIG-SJTU/AlphaPose
Commit Name: 49dd75911a6b7c40d2c49c4e2106a95c4ed08b50
Time: 2020-08-15
Author: 510641426@qq.com
File Name: scripts/demo_inference.py
Class Name:
Method Name: