THUDM / GATNE

Source code and dataset for KDD 2019 paper "Representation Learning for Attributed Multiplex Heterogeneous Network"
MIT License
525 stars 141 forks source link

Optimize back propagation execution speed 🔨 #115

Closed im0qianqian closed 2 years ago

im0qianqian commented 2 years ago

Use torch.diagonal replaces the original loop operation, which can greatly improve the backward speed of the model, especially on large-scale graphs.


Experiment (for reference only)

Number of nodes: 19942 Number of edges: 27045268

Execution time of the original loop operation: 12.43s/it Execution time of the torch.diagonal: 23.87it/s (297x ↑)

cenyk1230 commented 2 years ago

Thanks for your contribution!