4ddd477f356d51d87763a5b27c8948f007691a50,examples/pytorch/graphsage/train_sampling_multi_gpu.py,,,#,244

Before Change


    labels = th.LongTensor(data.labels)
    n_classes = data.num_labels
    // Construct graph
    g = dgl.graph(data.graph.all_edges())
    g.ndata["features"] = features
    prepare_mp(g)
    // Pack data
    data = train_mask, val_mask, in_feats, labels, n_classes, g

    if n_gpus == 1:
        run(0, n_gpus, args, devices, data)
    else:
        procs = []
        for proc_id in range(n_gpus):
            p = mp.Process(target=thread_wrapped_func(run),
                           args=(proc_id, n_gpus, args, devices, data))
            p.start()
            procs.append(p)

After Change


    g, n_classes = load_reddit()
    // Construct graph
    g = dgl.as_heterograph(g)
    in_feats = g.ndata["features"].shape[1]

    if args.inductive:
        train_g, val_g, test_g = inductive_split(g)
    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: dmlc/dgl
Commit Name: 4ddd477f356d51d87763a5b27c8948f007691a50
Time: 2020-07-02
Author: coin2028@hotmail.com
File Name: examples/pytorch/graphsage/train_sampling_multi_gpu.py
Class Name:
Method Name:


Project Name: dmlc/dgl
Commit Name: 2c141229d5489bfe58995ad023b1fd4aabe0dfa0
Time: 2020-08-03
Author: huxk_hit@qq.com
File Name: examples/pytorch/graphsage/train_cv_multi_gpu.py
Class Name:
Method Name:


Project Name: dmlc/dgl
Commit Name: 2c141229d5489bfe58995ad023b1fd4aabe0dfa0
Time: 2020-08-03
Author: huxk_hit@qq.com
File Name: examples/pytorch/graphsage/train_cv.py
Class Name:
Method Name: