BrainGB icon indicating copy to clipboard operation
BrainGB copied to clipboard

IndexError

Open fatemehghanadi opened this issue 1 year ago • 2 comments

Hello. when i run this code on cuda environment this error happend. would you please help me fixing it? python -m examples.example_main --dataset_name ABIDE --pooling concat --gcn_mp_type edge_node_concate --hidden_dim 256


(base) C:\Users\Tandi\Downloads\BrainGB>python -m examples.example_main --dataset_name ABIDE --pooling concat --gcn_mp_type edge_node_concate --hidden_dim 256
Processing...
Done!
seed for seed_everything(): 767955
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Tandi\Downloads\BrainGB\examples\example_main.py", line 149, in <module>
    main(parser.parse_args())
  File "C:\Users\Tandi\Downloads\BrainGB\examples\example_main.py", line 69, in main
    train_set, test_set = dataset[train_index], dataset[test_index]
                          ~~~~~~~^^^^^^^^^^^^^
  File "C:\Users\Tandi\anaconda3\Lib\site-packages\torch_geometric\data\dataset.py", line 268, in __getitem__
    return self.index_select(idx)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tandi\anaconda3\Lib\site-packages\torch_geometric\data\dataset.py", line 306, in index_select
    raise IndexError(
IndexError: Only slices (':'), list, tuples, torch.tensor and np.ndarray of dtype long or bool are valid indices (got 'ndarray')

fatemehghanadi avatar Oct 24 '23 09:10 fatemehghanadi