8f9cabbf7f1adb9ef680f6c3cf2067a8c8f7a628,tests/layer/test_rgcn.py,,test_RGCN_apply_sparse,#,182

Before Change



    As = get_As(G)
    As = [A.tocoo() for A in As]
    A_indices = [
        np.expand_dims(np.hstack((A.row[:, None], A.col[:, None])), 0) for A in As
    ]
    A_values = [np.expand_dims(A.data, 0) for A in As]

    generator = RelationalFullBatchNodeGenerator(G, sparse=True)
    rgcnModel = RGCN([2], generator, num_bases=10, activations=["relu"], dropout=0.5)

    x_in, x_out = rgcnModel.in_out_tensors()
    model = keras.Model(inputs=x_in, outputs=x_out)

    // Check fit method
    out_indices = np.array([[0, 1]], dtype="int32")
    preds_1 = model.predict([features[None, :, :], out_indices] + A_indices + A_values)
    assert preds_1.shape == (1, 2, 2)

    // Check fit method

After Change



    As = get_As(G)
    As = [A.tocoo() for A in As]
    A_indices = [
        np.expand_dims(np.hstack((A.row[:, None], A.col[:, None])).astype(np.int64), 0)
        for A in As
    ]
    A_values = [np.expand_dims(A.data, 0) for A in As]

    generator = RelationalFullBatchNodeGenerator(G, sparse=True)
    rgcnModel = RGCN([2], generator, num_bases=10, activations=["relu"], dropout=0.5)

    x_in, x_out = rgcnModel.in_out_tensors()
    model = keras.Model(inputs=x_in, outputs=x_out)

    // Check fit method
    out_indices = np.array([[0, 1]], dtype="int32")
    preds_1 = model.predict([features[None, :, :], out_indices] + A_indices + A_values)
    assert preds_1.shape == (1, 2, 2)

    // Check fit method
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 9

Non-data size: 4

Instances


Project Name: stellargraph/stellargraph
Commit Name: 8f9cabbf7f1adb9ef680f6c3cf2067a8c8f7a628
Time: 2020-06-24
Author: Huon.Wilson@data61.csiro.au
File Name: tests/layer/test_rgcn.py
Class Name:
Method Name: test_RGCN_apply_sparse


Project Name: stellargraph/stellargraph
Commit Name: 8f9cabbf7f1adb9ef680f6c3cf2067a8c8f7a628
Time: 2020-06-24
Author: Huon.Wilson@data61.csiro.au
File Name: tests/layer/test_appnp.py
Class Name:
Method Name: test_APPNP_linkmodel_apply_sparse


Project Name: stellargraph/stellargraph
Commit Name: 8f9cabbf7f1adb9ef680f6c3cf2067a8c8f7a628
Time: 2020-06-24
Author: Huon.Wilson@data61.csiro.au
File Name: tests/layer/test_rgcn.py
Class Name:
Method Name: test_RelationalGraphConvolution_sparse


Project Name: stellargraph/stellargraph
Commit Name: 8f9cabbf7f1adb9ef680f6c3cf2067a8c8f7a628
Time: 2020-06-24
Author: Huon.Wilson@data61.csiro.au
File Name: tests/layer/test_appnp.py
Class Name:
Method Name: test_APPNP_apply_propagate_model_sparse


Project Name: stellargraph/stellargraph
Commit Name: 8f9cabbf7f1adb9ef680f6c3cf2067a8c8f7a628
Time: 2020-06-24
Author: Huon.Wilson@data61.csiro.au
File Name: tests/layer/test_rgcn.py
Class Name:
Method Name: test_RGCN_apply_sparse_directed


Project Name: stellargraph/stellargraph
Commit Name: 8f9cabbf7f1adb9ef680f6c3cf2067a8c8f7a628
Time: 2020-06-24
Author: Huon.Wilson@data61.csiro.au
File Name: tests/layer/test_gcn.py
Class Name:
Method Name: test_GCN_linkmodel_apply_sparse


Project Name: stellargraph/stellargraph
Commit Name: 8f9cabbf7f1adb9ef680f6c3cf2067a8c8f7a628
Time: 2020-06-24
Author: Huon.Wilson@data61.csiro.au
File Name: tests/layer/test_appnp.py
Class Name:
Method Name: test_APPNP_apply_sparse


Project Name: stellargraph/stellargraph
Commit Name: 8f9cabbf7f1adb9ef680f6c3cf2067a8c8f7a628
Time: 2020-06-24
Author: Huon.Wilson@data61.csiro.au
File Name: tests/layer/test_gcn.py
Class Name:
Method Name: test_GCN_apply_sparse


Project Name: stellargraph/stellargraph
Commit Name: 8f9cabbf7f1adb9ef680f6c3cf2067a8c8f7a628
Time: 2020-06-24
Author: Huon.Wilson@data61.csiro.au
File Name: tests/layer/test_gcn.py
Class Name:
Method Name: test_GraphConvolution_sparse