Article directory
Problem Description:
When using from torch_geometric.nn import attention
this command, the module cannot be found suddenly and an error message appears.Cannot find reference 'attention' in '__init__.py'
Cannot find reference 'attention' in '__init__.py'
Cause Analysis:
The reason for this problem is that your torch-geometric
version is too low and this module has not been introduced yet.
solution:
Just update your torch-geometric
to the latest or to 2.4.0+ or above.
pip install -U torch-geometric