Replies: 1 comment
-
You also need to implement the def len(self) -> int:
... # return number of examples |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When i create a dataset like this, An error has occurred。
dataset = P2MDataSet('./datasets/sp2') (√)
print(dataset[0]) (×) error in here
Traceback (most recent call last):
File "/share/users/lihuimin/pro/cpy/datasets/p2m_dataset.py", line 131, in
print(dataset[0])
File "/data/lihuimin/.conda/envs/cv/lib/python3.9/site-packages/torch_geometric/data/dataset.py", line 197, in getitem
data = self.get(self.indices()[idx])
File "/data/lihuimin/.conda/envs/cv/lib/python3.9/site-packages/torch_geometric/data/dataset.py", line 90, in indices
return range(self.len()) if self._indices is None else self._indices
File "/data/lihuimin/.conda/envs/cv/lib/python3.9/site-packages/torch_geometric/data/dataset.py", line 62, in len
raise NotImplementedError
NotImplementedError
Process finished with exit code 1
Beta Was this translation helpful? Give feedback.
All reactions