2c141229d5489bfe58995ad023b1fd4aabe0dfa0,examples/pytorch/graphsage/train_cv_multi_gpu.py,,,#,370
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.share_memory_()
create_history_storage(g, args, n_classes)
prepare_mp(g)
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"]
val_mask = g.ndata["val_mask"]
g.ndata["features"] = features.share_memory_()
create_history_storage(g, args, n_classes)
prepare_mp(g)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 22
Instances
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:
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_sampling_unsupervised.py
Class Name:
Method Name: main