นี่คือรหัสสำหรับการทำซ้ำผลลัพธ์คีย์สำหรับผู้สำเร็จการศึกษา: การกลั่นกราฟที่รับรู้บนกราฟข้อความ

โปรดไปที่ GradBERT หรือ GradMLP สำหรับคำแนะนำเพิ่มเติม
การพึ่งพาการเรียกใช้รหัสอยู่ในไฟล์ requirements.txt . txt
นอกจากนี้เรายังทำตามกระบวนการติดตั้งจาก [Giant]
ก่อนอื่นมาตั้งค่า Conviroment Conviroment
conda create -n " grad " python=3.8
conda activate gradต่อไปเราติดตั้ง pytorch:
conda install pytorch==1.9.0 cudatoolkit=10.2 -c pytorch
# check the pytorch version and cuda availability
python -c " import torch; print('torch={}, cuda={}'.format(torch.__version__, torch.cuda.is_available())) "Finall เราติดตั้งแพ็คเกจที่เกี่ยวข้องกับ GNN
ptcu_version= " 1.9.0+cu102 "
pip install torch-scatter -f " https://pytorch-geometric.com/whl/torch- ${ptcu_version} .html "
pip install torch-sparse -f " https://pytorch-geometric.com/whl/torch- ${ptcu_version} .html "
pip install torch-cluster -f " https://pytorch-geometric.com/whl/torch- ${ptcu_version} .html "
pip install torch-spline-conv -f " https://pytorch-geometric.com/whl/torch- ${ptcu_version} .html "
pip install torch-geometric
pip install ogb==1.3.2
# our ogb version is 1.3.2
python -c " import ogb; from ogb.graphproppred import PygGraphPropPredDataset; print(ogb.__version__) " โปรดดาวน์โหลด Embeddings Node ที่ผ่านการฝึกอบรมล่วงหน้าจากลิงค์นี้ https://drive.google.com/drive/folders/1tol67yewyoGusf4t2qwrds-hbhbg-icxus โปรดตรวจสอบให้แน่ใจว่าโฟลเดอร์สกัดมี substrucutre substrucutre GradBERT/embeddings/ogbn-*/
จากนั้นคุณสามารถไปที่โฟลเดอร์ ogbn-arxiv หรือ ogbn-products และเรียกใช้คำสั่ง sh ที่สอดคล้องกันเพื่อทำซ้ำผลลัพธ์ gradbert สำหรับ OGB Leadyboard
ด้านล่างคุณสามารถค้นหาสคริปต์เพื่อทำซ้ำผลลัพธ์ที่สำคัญ
./GRAD
| ---- GradBERT/ # OGB datasets
| | ---- embeddings/
| | ---- ogbn-arxiv/
| | | ---- gradbert_mlp.sh # MLP with GradBERT feats
| | | ---- gradbert_sage.sh # SAGE with GradBERT feats
| | | ---- RevGAT-ori
| | ---- gradbert_RevGAT_ogbnarxiv.sh # RevGAT with GradBERT feats
| | ---- ogbn-products/
| | | ---- gradbert_mlp.sh # MLP with GradBERT feats
| | | ---- gradbert_giant_sage.sh # SAGE with GradBERT+GIANT feats
| | | ---- SAGN_with_SLE
| | ---- Runexp_SAGN_SLE_ogbnproducts_morestages.sh # SAGN_SLE with GradBERT+GIANT feats
| ---- GradMLP/ # CPF data from GLNN
| | ---- experiments/
| | | ---- cora_gradmlp.sh
| | | ---- cora_gradmlp_kd.sh
| | | ---- etc.
Please go to ` GradBERT ` or ` GradMLP ` for more details.