mims-harvard / SubGNN

Subgraph Neural Networks (NeurIPS 2020)
https://zitniklab.hms.harvard.edu/projects/SubGNN
MIT License
185 stars 33 forks source link

IndexError: list index out of range #20

Open youngfish42 opened 2 years ago

youngfish42 commented 2 years ago

When run python prepare_dataset.py ONCE CONV =GIN and MINIBATCH =NeighborSampler Regardless of the real-world dataset used, I got the following error message

Using device: cuda GeForce GTX 1080 Graph density 0.030438832087358775 Data(edge_index=[2, 3238174], num_classes=1, test_mask=[3238174], train_mask=[3238174], val_mask=[3238174], x=[14587, 14587], y=[3238174]) {'batch_size': 512, 'hidden': 128, 'output': 64, 'lr': 0.001, 'wd': 0.0005, 'nb_size': -1, 'dropout': 0.4} Traceback (most recent call last): File "prepare_dataset.py", line 831, in main() File "prepare_dataset.py", line 827, in main if config.GENERATE_NODE_EMB: train_node_emb.generate_emb() File "/data/usr/XXX/SubGNN/prepare_dataset/train_node_emb.py", line 160, in generate_emb model = mdl.TrainNet(all_data.x.shape[1], curr_hyperparameters['hidden'], currhyperparameters['output'], config.CONV.lower().split("")[1], curr_hyperparameters['dropout']).to(device) IndexError: list index out of range

However, when CONV = graphsaint_gcn and MINIBATCH = GraphSaint, that's all right.

hoangntc commented 2 years ago

When run python prepare_dataset.py ONCE CONV =GIN and MINIBATCH =NeighborSampler Regardless of the real-world dataset used, I got the following error message

Using device: cuda GeForce GTX 1080 Graph density 0.030438832087358775 Data(edge_index=[2, 3238174], num_classes=1, test_mask=[3238174], train_mask=[3238174], val_mask=[3238174], x=[14587, 14587], y=[3238174]) {'batch_size': 512, 'hidden': 128, 'output': 64, 'lr': 0.001, 'wd': 0.0005, 'nb_size': -1, 'dropout': 0.4} Traceback (most recent call last): File "prepare_dataset.py", line 831, in main() File "prepare_dataset.py", line 827, in main if config.GENERATE_NODE_EMB: train_node_emb.generate_emb() File "/data/usr/XXX/SubGNN/prepare_dataset/train_node_emb.py", line 160, in generate_emb model = mdl.TrainNet(all_data.x.shape[1], curr_hyperparameters['hidden'], currhyperparameters['output'], config.CONV.lower().split("")[1], curr_hyperparameters['dropout']).to(device) IndexError: list index out of range

However, when CONV = graphsaint_gcn and MINIBATCH = GraphSaint, that's all right.

Hi, I got into the same problem. Do you know how to fix it?

youngfish42 commented 2 years ago

When run python prepare_dataset.py ONCE CONV =GIN and MINIBATCH =NeighborSampler Regardless of the real-world dataset used, I got the following error message Using device: cuda GeForce GTX 1080 Graph density 0.030438832087358775 Data(edge_index=[2, 3238174], num_classes=1, test_mask=[3238174], train_mask=[3238174], val_mask=[3238174], x=[14587, 14587], y=[3238174]) {'batch_size': 512, 'hidden': 128, 'output': 64, 'lr': 0.001, 'wd': 0.0005, 'nb_size': -1, 'dropout': 0.4} Traceback (most recent call last): File "prepare_dataset.py", line 831, in main() File "prepare_dataset.py", line 827, in main if config.GENERATE_NODE_EMB: train_node_emb.generate_emb() File "/data/usr/XXX/SubGNN/prepare_dataset/train_node_emb.py", line 160, in generate_emb model = mdl.TrainNet(all_data.x.shape[1], curr_hyperparameters['hidden'], currhyperparameters['output'], config.CONV.lower().split("")[1], curr_hyperparameters['dropout']).to(device) IndexError: list index out of range However, when CONV = graphsaint_gcn and MINIBATCH = GraphSaint, that's all right.

Hi, I got into the same problem. Do you know how to fix it?

YES,I have fixed it.

In ”SubGNN/prepare_dataset/train_node_emb.py", line 160 change model = mdl.TrainNet(all_data.x.shape[1], curr_hyperparameters['hidden'], curr_hyperparameters['output'],config.CONV.lower().split("_")[1], curr_hyperparameters['dropout']).to(device)

with model = mdl.TrainNet(all_data.x.shape[1], curr_hyperparameters['hidden'], curr_hyperparameters['output'],config.CONV.lower().split("_")[-1], curr_hyperparameters['dropout']).to(device)