import torch from torch_geometricdata import Data InMemoryDataset import pandas as pd class My_datasetInMemoryDataset def __init__self root transform=None pre_transform=None superMy_datas
The error message indicates that index 10 is out of bounds for dimension 0 with size 10. This means that the index 10 is larger than the maximum index allowed in dimension 0, which is 9 in this case.
To fix this issue, you need to check the dimensions and indices used in your code. Specifically, check the dimensions and sizes of your input data (x) and edge indices (edge_index). Make sure that the indices are within the correct range and that the dimensions match the expected sizes.
Additionally, you should also check the size of your train_mask and val_mask tensors. Ensure that they have the correct dimensions and sizes to match your data.
By resolving these issues, you should be able to fix the "out of bounds" error.
原文地址: https://www.cveoy.top/t/topic/i6dX 著作权归作者所有。请勿转载和采集!