You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an error on tensorflow has no attribute placeholder
[wal@sokrates src]$ python3 preprocess.py --dataset movie
reading item index to entity id file: ../data/movie/item_index2entity_id_rehashed.txt ...
reading rating file ...
converting rating file ...
number of users: 6036
number of items: 2445
converting kg file ...
number of entities (containing items): 182011
number of relations: 12
done
[wal@sokrates src]$ python3 main.py --dataset movie
2020-07-31 07:16:47.893636: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2020-07-31 07:16:47.893676: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
reading rating file ...
splitting dataset ...
reading KG file ...
constructing knowledge graph ...
constructing ripple set ...
Traceback (most recent call last):
File "main.py", line 45, in<module>
train(args, data_info, show_loss)
File "/home/wal/src/github/RippleNet/src/train.py", line 14, in train
model = RippleNet(args, n_entity, n_relation)
File "/home/wal/src/github/RippleNet/src/model.py", line 9, in __init__
self._build_inputs()
File "/home/wal/src/github/RippleNet/src/model.py", line 28, in _build_inputs
self.items = tf.placeholder(dtype=tf.int32, shape=[None], name="items")
AttributeError: module 'tensorflow' has no attribute 'placeholder'
my installation running on CentOS8 ⬇️
[wal@sokrates src]$ pip3 install tensorflow
Defaulting to user installation because normal site-packages is not writeable
Collecting tensorflow
Downloading tensorflow-2.3.0-cp36-cp36m-manylinux2010_x86_64.whl (320.4 MB)
|████████████████████████████████| 320.4 MB 38 kB/s
Collecting opt-einsum>=2.3.2
Downloading opt_einsum-3.3.0-py3-none-any.whl (65 kB)
|████████████████████████████████| 65 kB 2.1 MB/s
Collecting keras-preprocessing<1.2,>=1.1.1
Downloading Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
|████████████████████████████████| 42 kB 7.1 kB/s
Requirement already satisfied: numpy<1.19.0,>=1.16.0 in /usr/local/lib64/python3.6/site-packages (from tensorflow) (1.18.2)
Collecting grpcio>=1.8.6
Downloading grpcio-1.30.0-cp36-cp36m-manylinux2010_x86_64.whl (3.0 MB)
|████████████████████████████████| 3.0 MB 3.6 MB/s
Collecting tensorboard<3,>=2.3.0
Downloading tensorboard-2.3.0-py3-none-any.whl (6.8 MB)
|████████████████████████████████| 6.8 MB 3.7 MB/s
Collecting six>=1.12.0
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting astunparse==1.6.3
Downloading astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting wrapt>=1.11.1
Downloading wrapt-1.12.1.tar.gz (27 kB)
Collecting termcolor>=1.1.0
Downloading termcolor-1.1.0.tar.gz (3.9 kB)
Collecting google-pasta>=0.1.8
Downloading google_pasta-0.2.0-py3-none-any.whl (57 kB)
|████████████████████████████████| 57 kB 1.7 MB/s
Collecting tensorflow-estimator<2.4.0,>=2.3.0
Downloading tensorflow_estimator-2.3.0-py2.py3-none-any.whl (459 kB)
|████████████████████████████████| 459 kB 2.6 MB/s
Collecting h5py<2.11.0,>=2.10.0
Downloading h5py-2.10.0-cp36-cp36m-manylinux1_x86_64.whl (2.9 MB)
|████████████████████████████████| 2.9 MB 2.9 MB/s
Collecting gast==0.3.3
Downloading gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Collecting absl-py>=0.7.0
Downloading absl-py-0.9.0.tar.gz (104 kB)
|████████████████████████████████| 104 kB 4.7 MB/s
Collecting scipy==1.4.1
Downloading scipy-1.4.1-cp36-cp36m-manylinux1_x86_64.whl (26.1 MB)
|████████████████████████████████| 26.1 MB 3.5 MB/s
Requirement already satisfied: wheel>=0.26 in /home/wal/.local/lib/python3.6/site-packages (from tensorflow) (0.34.2)
Collecting protobuf>=3.9.2
Downloading protobuf-3.12.4-cp36-cp36m-manylinux1_x86_64.whl (1.3 MB)
|████████████████████████████████| 1.3 MB 2.5 MB/s
Requirement already satisfied: setuptools>=41.0.0 in /home/wal/.local/lib/python3.6/site-packages (from tensorboard<3,>=2.3.0->tensorflow) (46.1.3)
Collecting tensorboard-plugin-wit>=1.6.0
Downloading tensorboard_plugin_wit-1.7.0-py3-none-any.whl (779 kB)
|████████████████████████████████| 779 kB 3.0 MB/s
Collecting google-auth-oauthlib<0.5,>=0.4.1
Downloading google_auth_oauthlib-0.4.1-py2.py3-none-any.whl (18 kB)
Collecting requests<3,>=2.21.0
Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
|████████████████████████████████| 61 kB 319 kB/s
Collecting google-auth<2,>=1.6.3
Downloading google_auth-1.20.0-py2.py3-none-any.whl (91 kB)
|████████████████████████████████| 91 kB 3.0 MB/s
Collecting markdown>=2.6.8
Downloading Markdown-3.2.2-py3-none-any.whl (88 kB)
|████████████████████████████████| 88 kB 2.1 MB/s
Collecting werkzeug>=0.11.15
Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
|████████████████████████████████| 298 kB 2.9 MB/s
Collecting requests-oauthlib>=0.7.0
Downloading requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
Requirement already satisfied: idna<3,>=2.5 in /usr/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2.5)
Collecting certifi>=2017.4.17
Downloading certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
|████████████████████████████████| 156 kB 2.3 MB/s
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (1.24.2)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (3.0.4)
Collecting cachetools<5.0,>=2.0.0
Downloading cachetools-4.1.1-py3-none-any.whl (10 kB)
Collecting rsa<5,>=3.1.4; python_version >= "3.5"
Downloading rsa-4.6-py3-none-any.whl (47 kB)
|████████████████████████████████| 47 kB 1.8 MB/s
Collecting pyasn1-modules>=0.2.1
Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
|████████████████████████████████| 155 kB 3.0 MB/s
Requirement already satisfied: importlib-metadata; python_version <"3.8"in /usr/local/lib/python3.6/site-packages (from markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow) (1.6.0)
Collecting oauthlib>=3.0.0
Downloading oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
|████████████████████████████████| 147 kB 2.6 MB/s
Collecting pyasn1>=0.1.3
Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
|████████████████████████████████| 77 kB 2.4 MB/s
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/site-packages (from importlib-metadata; python_version <"3.8"->markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow) (3.1.0)
Building wheels for collected packages: wrapt, termcolor, absl-py
Building wheel for wrapt (setup.py) ... done
Created wheel for wrapt: filename=wrapt-1.12.1-py3-none-any.whl size=19553 sha256=41ab74e739aa621d009b5b350e811214afad647ffbc731e00f46d29e571fb7d6
Stored in directory: /home/wal/.cache/pip/wheels/32/42/7f/23cae9ff6ef66798d00dc5d659088e57dbba01566f6c60db63
Building wheel for termcolor (setup.py) ... done
Created wheel for termcolor: filename=termcolor-1.1.0-py3-none-any.whl size=4830 sha256=830b62f601c1585e2beaa337eb76d19172e15f8fd5db527f6d745ae63ece2a6a
Stored in directory: /home/wal/.cache/pip/wheels/93/2a/eb/e58dbcbc963549ee4f065ff80a59f274cc7210b6eab962acdc
Building wheel for absl-py (setup.py) ... done
Created wheel for absl-py: filename=absl_py-0.9.0-py3-none-any.whl size=121931 sha256=7b89b84de07364d0141edbeb017d1bb09874243caf53f5181a8b59f3fe3ab447
Stored in directory: /home/wal/.cache/pip/wheels/c3/af/84/3962a6af7b4ab336e951b7877dcfb758cf94548bb1771e0679
Successfully built wrapt termcolor absl-py
Installing collected packages: opt-einsum, six, keras-preprocessing, grpcio, absl-py, tensorboard-plugin-wit, cachetools, pyasn1, rsa, pyasn1-modules, google-auth, certifi, requests, oauthlib, requests-oauthlib, google-auth-oauthlib, protobuf, markdown, werkzeug, tensorboard, astunparse, wrapt, termcolor, google-pasta, tensorflow-estimator, h5py, gast, scipy, tensorflow
Successfully installed absl-py-0.9.0 astunparse-1.6.3 cachetools-4.1.1 certifi-2020.6.20 gast-0.3.3 google-auth-1.20.0 google-auth-oauthlib-0.4.1 google-pasta-0.2.0 grpcio-1.30.0 h5py-2.10.0 keras-preprocessing-1.1.2 markdown-3.2.2 oauthlib-3.1.0 opt-einsum-3.3.0 protobuf-3.12.4 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-2.24.0 requests-oauthlib-1.3.0 rsa-4.6 scipy-1.4.1 six-1.15.0 tensorboard-2.3.0 tensorboard-plugin-wit-1.7.0 tensorflow-2.3.0 tensorflow-estimator-2.3.0 termcolor-1.1.0 werkzeug-1.0.1 wrapt-1.12.1
WARNING: You are using pip version 20.1.1; however, version 20.2 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
[wal@sokrates src]$ pip3 install sklearn
Defaulting to user installation because normal site-packages is not writeable
Collecting sklearn
Downloading sklearn-0.0.tar.gz (1.1 kB)
Collecting scikit-learn
Downloading scikit_learn-0.23.1-cp36-cp36m-manylinux1_x86_64.whl (6.8 MB)
|████████████████████████████████| 6.8 MB 2.4 MB/s
Collecting threadpoolctl>=2.0.0
Downloading threadpoolctl-2.1.0-py3-none-any.whl (12 kB)
Collecting joblib>=0.11
Downloading joblib-0.16.0-py3-none-any.whl (300 kB)
|████████████████████████████████| 300 kB 2.3 MB/s
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib64/python3.6/site-packages (from scikit-learn->sklearn) (1.18.2)
Requirement already satisfied: scipy>=0.19.1 in /home/wal/.local/lib/python3.6/site-packages (from scikit-learn->sklearn) (1.4.1)
Building wheels for collected packages: sklearn
Building wheel for sklearn (setup.py) ... done
Created wheel for sklearn: filename=sklearn-0.0-py2.py3-none-any.whl size=1315 sha256=9513e4d84f5f4f90e3a2366ac1c11226624e08fe6bc41b99ecc2e77e70f044cc
Stored in directory: /home/wal/.cache/pip/wheels/23/9d/42/5ec745cbbb17517000a53cecc49d6a865450d1f5cb16dc8a9c
Successfully built sklearn
Installing collected packages: threadpoolctl, joblib, scikit-learn, sklearn
Successfully installed joblib-0.16.0 scikit-learn-0.23.1 sklearn-0.0 threadpoolctl-2.1.0
WARNING: You are using pip version 20.1.1; however, version 20.2 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
[wal@sokrates src]$ python3 preprocess.py --dataset movie
reading item index to entity id file: ../data/movie/item_index2entity_id_rehashed.txt ...
reading rating file ...
converting rating file ...
number of users: 6036
number of items: 2445
converting kg file ...
number of entities (containing items): 182011
number of relations: 12
done
[wal@sokrates src]$ python3 main.py --dataset movie
2020-07-31 07:16:47.893636: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2020-07-31 07:16:47.893676: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
reading rating file ...
splitting dataset ...
reading KG file ...
constructing knowledge graph ...
constructing ripple set ...
Traceback (most recent call last):
File "main.py", line 45, in<module>
train(args, data_info, show_loss)
File "/home/wal/src/github/RippleNet/src/train.py", line 14, in train
model = RippleNet(args, n_entity, n_relation)
File "/home/wal/src/github/RippleNet/src/model.py", line 9, in __init__
self._build_inputs()
File "/home/wal/src/github/RippleNet/src/model.py", line 28, in _build_inputs
self.items = tf.placeholder(dtype=tf.int32, shape=[None], name="items")
AttributeError: module 'tensorflow' has no attribute 'placeholder'
The text was updated successfully, but these errors were encountered:
I get an error on tensorflow has no attribute placeholder
my installation running on CentOS8 ⬇️
The text was updated successfully, but these errors were encountered: