ogb icon indicating copy to clipboard operation
ogb copied to clipboard

AttributeError: 'GlobalStorage' object has no attribute 'num_classes'

Open aamna2401 opened this issue 2 years ago • 1 comments

data.num_classes Traceback (most recent call last): File ~/anaconda3/lib/python3.8/site-packages/torch_geometric/data/storage.py:50 in getattr return self[key] File ~/anaconda3/lib/python3.8/site-packages/torch_geometric/data/storage.py:70 in getitem return self._mapping[key] KeyError: 'num_classes' During handling of the above exception, another exception occurred: Traceback (most recent call last): Input In [40] in <cell line: 1> data.num_classes File ~/anaconda3/lib/python3.8/site-packages/torch_geometric/data/data.py:362 in getattr return getattr(self._store, key) File ~/anaconda3/lib/python3.8/site-packages/torch_geometric/data/storage.py:52 in getattr raise AttributeError( AttributeError: 'GlobalStorage' object has no attribute 'num_classes'

aamna2401 avatar Jun 19 '22 14:06 aamna2401

Can you give the code to reproduce it?

weihua916 avatar Jun 19 '22 15:06 weihua916