GraphCL icon indicating copy to clipboard operation
GraphCL copied to clipboard

About semisupervised_MNIST_CIFAR10

Open Austinzhenghua opened this issue 4 years ago • 4 comments

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?

Austinzhenghua avatar Jul 10 '21 13:07 Austinzhenghua

  1. Please check if the dataset is on the correct path.
  2. Maybe you can try to change the other different version for pickle.

yongduosui avatar Jul 10 '21 14:07 yongduosui

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

Austinzhenghua avatar Jul 11 '21 12:07 Austinzhenghua

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

yongduosui avatar Jul 11 '21 12:07 yongduosui

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.

Austinzhenghua avatar Jul 11 '21 15:07 Austinzhenghua