Shen-Lab / GraphCL

[NeurIPS 2020] "Graph Contrastive Learning with Augmentations" by Yuning You, Tianlong Chen, Yongduo Sui, Ting Chen, Zhangyang Wang, Yang Shen
MIT License
548 stars 103 forks source link

About semisupervised_MNIST_CIFAR10 #32

Open Austinzhenghua opened 3 years ago

Austinzhenghua commented 3 years ago

When I run main_superpixels_contrastive.py I got
f = pickle.load(f) ModuleNotFoundError: No module named 'data.superpixels'

I don't know why "f = pickle.load(f)" can cause this problem?

yongduosui commented 3 years ago
  1. Please check if the dataset is on the correct path.
  2. Maybe you can try to change the other different version for pickle.
Austinzhenghua commented 3 years ago

Thank you so much, I found the reason is that, there are no init files in each package.

Another problem is when I run main_superpixels_graph_classification.py I got :

I] Loading dataset MNIST... train, test, val sizes : 5500 10000 5000 [I] Finished loading. [I] Data load time: 25.4718s

MODEL DETAILS:

MODEL/Total parameters: GIN 105434 ----------------------------------------Finetune Option---------------------------------------- Data Name: [MNIST] Model Name: [GIN] Training Graphs:[5500] Valid Graphs: [5000] Test Graphs: [10000] Number Classes: [10] Learning rate: [0.001] ----------------------------------------Contrastive Option---------------------------------------- Load model: [True] Aug Type: [drop_nodes] Projection head:[True]


Traceback (most recent call last): File "/home/zhenghua/pythoncode/Graph_cl_MNIST_CIFAR10/finetuning/main_superpixels_graph_classification.py", line 332, in main()
File "/home/zhenghua/pythoncode/Graph_cl_MNIST_CIFAR10/finetuning/main_superpixels_graph_classification.py", line 298, in main train_val_pipeline(MODEL_NAME, dataset, params, net_params, args) File "/home/zhenghua/pythoncode/Graph_cl_MNIST_CIFAR10/finetuning/main_superpixels_graph_classification.py", line 79, in train_val_pipeline checkpoint = torch.load(load_file_name[-1]) IndexError: list index out of range

I am not sure why the Training Graphs become 5500. The pretrain training graph is 55000, Thank you so much, I need your help. @yongduosui yongduosui

yongduosui commented 3 years ago

This is finetuning code, please use the pretraining code first.

Austinzhenghua commented 3 years ago

Ok. thank you. I find the path of saved model of finetuen and pretrain is different. So I got the error information. Thank you! hua zheng @.*** 签名由 网易邮箱大师 定制 On 07/11/2021 20:56, Aventador wrote: This is finetuning code, please use the pretraining code first. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.