Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range #20

Open
youngfish42 opened this issue Jul 30, 2021 · 2 comments
Open

IndexError: list index out of range #20

youngfish42 opened this issue Jul 30, 2021 · 2 comments

Comments

@youngfish42
Copy link

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'], curr_hyperparameters['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
Copy link

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'], curr_hyperparameters['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
Copy link
Author

youngfish42 commented Oct 2, 2021

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'], curr_hyperparameters['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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants