xuhaocuhk / TilinGNN

TilinGNN: Learning to Tile with Self-Supervised Graph Neural Network (SIGGRAPH 2020)
63 stars 13 forks source link

AttributeError: 'NNConv' object has no attribute '__user_args__' #1

Closed Chaunceyw001 closed 4 years ago

Chaunceyw001 commented 4 years ago

Error with pytorch1.5.0, cuda10.2 in Ubuntu20

  1. error reported from "Tiling-Shape.py"

File "./Tiling-Shape.py", line 86, in tiling_a_region() File "./Tiling-Shape.py", line 59, in tiling_a_region result_brick_layout, score = solver.solve(result_brick_layout) File "/home/Desktop/clone/TilinGNN/solver/ml_solver/ml_solver.py", line 60, in solve output_solution, score, predict_order = algorithms.solve_by_probablistic_greedy(self, brick_layout) File "/home/Desktop/clone/TilinGNN/util/algorithms.py", line 31, in solve_by_probablistic_greedy prob = ml_solver.predict(temp_layout) File "/home/Desktop/clone/TilinGNN/solver/ml_solver/ml_solver.py", line 43, in predict col_e_features=collide_edge_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, kwargs) File "/home/Desktop/clone/TilinGNN/graph_networks/networks/TilinGNN.py", line 62, in forward brch_1feature, * = conv_layer(brch_1_feature, adj_e_index, adj_e_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, kwargs) File "/home/Desktop/clone/TilinGNN/graph_networks/layers/edge_conv.py", line 25, in forward x = self.nnConv(x, edge_index, edge_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, **kwargs) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/nn_conv.py", line 81, in forward return self.propagate(edge_index, x=x, pseudo=pseudo) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 250, in propagate kwargs = self.collect(edge_index, size, mp_type, kwargs) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 124, in collect for arg in self.user_args: File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 594, in getattr type(self).name, name)) AttributeError: 'NNConv' object has no attribute 'user_args'

  1. error reported from "Tiling-GUI.py" when press 'S' to solve

Traceback (most recent call last): File "./Tiling-GUI.py", line 133, in keyPressEvent self.current_solution_layout = self.solve_Brick_Layout(self.current_brick_layout) File "./Tiling-GUI.py", line 489, in solve_Brick_Layout result_brick_layout, score = self.solver.solve(brick_layout) File "/home/Desktop/clone/TilinGNN/solver/ml_solver/ml_solver.py", line 60, in solve output_solution, score, predict_order = algorithms.solve_by_probablistic_greedy(self, brick_layout) File "/home/Desktop/clone/TilinGNN/util/algorithms.py", line 31, in solve_by_probablistic_greedy prob = ml_solver.predict(temp_layout) File "/home/Desktop/clone/TilinGNN/solver/ml_solver/ml_solver.py", line 43, in predict col_e_features=collide_edge_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, kwargs) File "/home/Desktop/clone/TilinGNN/graph_networks/networks/TilinGNN.py", line 62, in forward brch_1feature, * = conv_layer(brch_1_feature, adj_e_index, adj_e_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, kwargs) File "/home/Desktop/clone/TilinGNN/graph_networks/layers/edge_conv.py", line 25, in forward x = self.nnConv(x, edge_index, edge_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, **kwargs) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/nn_conv.py", line 81, in forward return self.propagate(edge_index, x=x, pseudo=pseudo) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 250, in propagate kwargs = self.collect(edge_index, size, mp_type, kwargs) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 124, in collect for arg in self.user_args: File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 594, in getattr type(self).name, name)) AttributeError: 'NNConv' object has no attribute 'user_args'

xuhaocuhk commented 4 years ago

Hi, thank you for raising this issue, but we cannot reproduce this error. Could you tell us which version of your "Pytorch geometric" package you are using?

Chaunceyw001 commented 4 years ago

Hi, thank you for raising this issue, but we cannot reproduce this error. Could you tell us which version of your "Pytorch geometric" package you are using?

packages in environment at /home/.conda/envs/pytorch:

#

Name Version Build Channel

_libgcc_mutex 0.1 main
ase 3.19.1 pypi_0 pypi blas 1.0 mkl
bzip2 1.0.8 h7b6447c_0
ca-certificates 2020.1.1 0
cairo 1.14.12 h8948797_3
certifi 2020.4.5.2 py37_0
chardet 3.0.4 pypi_0 pypi cudatoolkit 10.2.89 hfd86e86_1
cycler 0.10.0 pypi_0 pypi decorator 4.4.2 pypi_0 pypi ffmpeg 4.0 hcdf2ecd_0
fontconfig 2.13.0 h9420a91_0
freeglut 3.0.0 hf484d3e_5
freetype 2.9.1 h8a8886c_1
future 0.18.2 pypi_0 pypi glib 2.63.1 h3eb4bd4_1
googledrivedownloader 0.4 pypi_0 pypi graphite2 1.3.13 h23475e2_0
h5py 2.10.0 pypi_0 pypi harfbuzz 1.8.8 hffaf4a1_0
hdf5 1.10.2 hba1933b_1
icu 58.2 he6710b0_3
idna 2.9 pypi_0 pypi intel-openmp 2020.1 217
isodate 0.6.0 pypi_0 pypi jasper 2.0.14 h07fcdf6_1
joblib 0.15.1 pypi_0 pypi jpeg 9b h024ee3a_2
kiwisolver 1.2.0 pypi_0 pypi ld_impl_linux-64 2.33.1 h53a641e_7
libedit 3.1.20181209 hc058e9b_0
libffi 3.3 he6710b0_1
libgcc-ng 9.1.0 hdf63c60_0
libgfortran-ng 7.3.0 hdf63c60_0
libglu 9.0.0 hf484d3e_1
libopencv 3.4.2 hb342d67_1
libopus 1.3.1 h7b6447c_0
libpng 1.6.37 hbc83047_0
libstdcxx-ng 9.1.0 hdf63c60_0
libtiff 4.1.0 h2733197_1
libuuid 1.0.3 h1bed415_2
libvpx 1.7.0 h439df22_0
libxcb 1.13 h1bed415_1
libxml2 2.9.10 he19cac6_1
llvmlite 0.33.0 pypi_0 pypi lz4-c 1.9.2 he6710b0_0
matplotlib 3.2.1 pypi_0 pypi mkl 2020.1 217
mkl-service 2.3.0 py37he904b0f_0
mkl_fft 1.0.15 py37ha843d7b_0
mkl_random 1.1.1 py37h0573a6f_0
ncurses 6.2 he6710b0_1
networkx 2.4 pypi_0 pypi ninja 1.9.0 py37hfd86e86_0
numba 0.50.0 pypi_0 pypi numpy 1.18.1 py37h4f9e942_0
numpy-base 1.18.1 py37hde5b4d6_1
olefile 0.46 py37_0
opencv 3.4.2 py37h6fd60c2_1
openssl 1.1.1g h7b6447c_0
pandas 1.0.4 pypi_0 pypi pcre 8.43 he6710b0_0
pillow 7.1.2 py37hb39fc2d_0
pip 20.0.2 py37_3
pixman 0.38.0 h7b6447c_0
plyfile 0.7.2 pypi_0 pypi py-opencv 3.4.2 py37hb342d67_1
pyparsing 2.4.7 pypi_0 pypi pyqt5 5.15.0 pypi_0 pypi pyqt5-sip 12.8.0 pypi_0 pypi python 3.7.7 hcff3b4d_5
python-dateutil 2.8.1 pypi_0 pypi pytorch 1.5.0 py3.7_cuda10.2.89_cudnn7.6.5_0 pytorch pytz 2020.1 pypi_0 pypi rdflib 5.0.0 pypi_0 pypi readline 8.0 h7b6447c_0
requests 2.23.0 pypi_0 pypi scikit-learn 0.23.1 pypi_0 pypi scipy 1.4.1 pypi_0 pypi setuptools 47.1.1 py37_0
shapely 1.7.0 pypi_0 pypi six 1.15.0 py_0
sqlite 3.31.1 h62c20be_1
threadpoolctl 2.1.0 pypi_0 pypi tk 8.6.8 hbc83047_0
torch-cluster 1.5.4 pypi_0 pypi torch-geometric 1.5.0 pypi_0 pypi torch-scatter 2.0.4 pypi_0 pypi torch-sparse 0.6.5 pypi_0 pypi torch-spline-conv 1.2.0 pypi_0 pypi torchvision 0.6.0 py37_cu102 pytorch tqdm 4.46.1 pypi_0 pypi urllib3 1.25.9 pypi_0 pypi wheel 0.34.2 py37_0
xz 5.2.5 h7b6447c_0
zlib 1.2.11 h7b6447c_3
zstd 1.4.4 h0b5b093_3

xuhaocuhk commented 4 years ago

This problem is due to the incompatible version of the pytorch and torch geometric package. Our pre-trained models were trained with pytorch 1.2.0, and torch geometric 1.3.2. The loading model failed due to the package update. You may rollback the two packages to an older version and try if it works. We will also train new models on new packages and release them ASAP.

xuhaocuhk commented 4 years ago

Hi, we just fixed the problem, please pull the code and try again.

Hao

Chaunceyw001 commented 4 years ago

Thanks for your fast action. Now it is solved, so I will close this one.