039a711da1c7833db3b45d212a4aaab9cfbf7a09,examples/mxnet/gcn/train.py,,main,#Any#,19

Before Change


    test_mask = test_mask.as_in_context(ctx)

    // create GCN model
    g = DGLGraph(data.graph)
    if args.self_loop:
        g.add_edges(g.nodes(), g.nodes())
    // normalization
    degs = g.in_degrees().astype("float32")
    norm = mx.nd.power(degs, -0.5)
    if cuda:
        norm = norm.as_in_context(ctx)
    g.ndata["norm"] = mx.nd.expand_dims(norm, 1)

    model = GCN(g,
                in_feats,

After Change


    test_mask = test_mask.as_in_context(ctx)

    // create GCN model
    g = data.graph
    if args.self_loop:
        g.remove_edges_from(g.selfloop_edges())
        g.add_edges_from(zip(g.nodes(), g.nodes()))
    g = DGLGraph(g)
    // normalization
    degs = g.in_degrees().astype("float32")
    norm = mx.nd.power(degs, -0.5)
    if cuda:
        norm = norm.as_in_context(ctx)
    g.ndata["norm"] = mx.nd.expand_dims(norm, 1)

    model = GCN(g,
                in_feats,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: dmlc/dgl
Commit Name: 039a711da1c7833db3b45d212a4aaab9cfbf7a09
Time: 2019-04-10
Author: 1339754545@qq.com
File Name: examples/mxnet/gcn/train.py
Class Name:
Method Name: main


Project Name: dmlc/dgl
Commit Name: 039a711da1c7833db3b45d212a4aaab9cfbf7a09
Time: 2019-04-10
Author: 1339754545@qq.com
File Name: examples/pytorch/gcn/gcn_mp.py
Class Name:
Method Name: main


Project Name: dmlc/dgl
Commit Name: 039a711da1c7833db3b45d212a4aaab9cfbf7a09
Time: 2019-04-10
Author: 1339754545@qq.com
File Name: examples/pytorch/gcn/train.py
Class Name:
Method Name: main