PetarV- / GAT

Graph Attention Networks (https://arxiv.org/abs/1710.10903)
https://petar-v.com/GAT/
MIT License
3.2k stars 644 forks source link

Code fails with tensorflow-2.9.1: module 'tensorflow' has no attribute 'layers' #87

Closed yurivict closed 1 year ago

yurivict commented 1 year ago
Traceback (most recent call last):
  File "/usr/home/yuri/nn-function-optimizer/GNN/GAT/execute_cora.py", line 5, in <module>
    from models import GAT
  File "/usr/home/yuri/nn-function-optimizer/GNN/GAT/models/__init__.py", line 1, in <module>
    from .gat import GAT
  File "/usr/home/yuri/nn-function-optimizer/GNN/GAT/models/gat.py", line 4, in <module>
    from utils import layers
  File "/usr/home/yuri/nn-function-optimizer/GNN/GAT/utils/layers.py", line 4, in <module>
    conv1d = tf.layers.conv1d
AttributeError: module 'tensorflow' has no attribute 'layers'

TensorFlow 2.9.2 was released in May 2022.

PetarV- commented 1 year ago

Hi Yuri,

Thanks for your issue!

For this specific repository, the emphasis is on providing the code in as-close-as-possible state to the one that produced the results in the GAT paper. As a result, we do not plan on upgrading the codebase to newer versions of TensorFlow.

Further, we make it clear in the README file:

I hope this answer is helpful!

Thanks, Petar