264d96cdf54667c0efaa943185ebe4f121a423ad,examples/pytorch/cluster_gcn/cluster_gcn.py,,main,#Any#,21

Before Change


        model, g, labels, test_mask, multitask)
    print("Test F1-mic{:.4f}, Test F1-mac{:.4f}". format(test_f1_mic, test_f1_mac))
    writer.add_scalar("test/f1-mic", test_f1_mic)
    writer.add_scalar("test/f1-mac", test_f1_mac)

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="GCN")
    register_data_args(parser)

After Change


        torch.cuda.set_device(args.gpu)
        val_mask = val_mask.cuda()
        test_mask = test_mask.cuda()
        g = g.int().to(args.gpu)

    print("labels shape:", g.ndata["label"].shape)
    print("features shape, ", g.ndata["feat"].shape)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: dmlc/dgl
Commit Name: 264d96cdf54667c0efaa943185ebe4f121a423ad
Time: 2020-08-07
Author: expye@outlook.com
File Name: examples/pytorch/cluster_gcn/cluster_gcn.py
Class Name:
Method Name: main


Project Name: facebookresearch/ParlAI
Commit Name: 892b037877b91d47df552079fa4463ee742104ee
Time: 2018-05-31
Author: kulikov@fb.com
File Name: parlai/scripts/train_model.py
Class Name: TrainLoop
Method Name: log


Project Name: facebookresearch/ParlAI
Commit Name: 892b037877b91d47df552079fa4463ee742104ee
Time: 2018-05-31
Author: kulikov@fb.com
File Name: parlai/scripts/train_model.py
Class Name: TrainLoop
Method Name: validate