2c141229d5489bfe58995ad023b1fd4aabe0dfa0,examples/pytorch/graphsage/train_cv.py,,,#,310

Before Change


    data = RedditDataset(self_loop=True)
    train_mask = data.train_mask
    val_mask = data.val_mask
    features = th.Tensor(data.features)
    in_feats = features.shape[1]
    labels = th.LongTensor(data.labels)
    n_classes = data.num_labels
    // Construct graph
    g = dgl.graph(data.graph.all_edges())
    g.ndata["features"] = features

After Change


    // load reddit data
    data = RedditDataset(self_loop=True)
    n_classes = data.num_classes
    g = data[0]
    features = g.ndata["feat"]
    in_feats = features.shape[1]
    labels = g.ndata["label"]
    train_mask = g.ndata["train_mask"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 10

Instances


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:


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: 02d3197407487646dc5ca6abd889b8fe5fed1aef
Time: 2020-06-27
Author: zhengda1936@gmail.com
File Name: examples/pytorch/graphsage/train_sampling.py
Class Name:
Method Name: