Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3-atari에서 breakout_a3c.py 실행에 관한 문제 #34

Open
rhkatjd00 opened this issue Sep 26, 2019 · 3 comments
Open

3-atari에서 breakout_a3c.py 실행에 관한 문제 #34

rhkatjd00 opened this issue Sep 26, 2019 · 3 comments

Comments

@rhkatjd00
Copy link

PC1
cpu: intel i-5
no graphic card
python 3.5
tensorflow 1.14
keras 2.3.0

PC2
cpu: inter i-7
rtx-2070
python 3.5
tensorflow 1.14
keras 2.3.0

breakout_a3c.py 실행 시
두 컴퓨터 모두 아래와 같은 에러가 발생합니다.
threading library관련 문제 같은데..

Model: "model_18"


Layer (type) Output Shape Param #

input_9 (InputLayer) (None, 84, 84, 4) 0


conv2d_17 (Conv2D) (None, 20, 20, 16) 4112


conv2d_18 (Conv2D) (None, 9, 9, 32) 8224


flatten_9 (Flatten) (None, 2592) 0


dense_25 (Dense) (None, 256) 663808


dense_27 (Dense) (None, 1) 257

Total params: 676,401
Trainable params: 676,401
Non-trainable params: 0


Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 207, in run
action, policy = self.get_action(history)
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 327, in get_action
policy = self.local_actor.predict(history)[0]
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training.py", line 1462, in predict
callbacks=callbacks)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training_arrays.py", line 276, in predict_loop
callbacks.model.stop_training = False
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/network.py", line 323, in setattr
super(Network, self).setattr(name, value)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/base_layer.py", line 1215, in setattr
if not _DISABLE_TRACKING.value:
AttributeError: '_thread._local' object has no attribute 'value'

Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 207, in run
action, policy = self.get_action(history)
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 327, in get_action
policy = self.local_actor.predict(history)[0]
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training.py", line 1462, in predict
callbacks=callbacks)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training_arrays.py", line 276, in predict_loop
callbacks.model.stop_training = False
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/network.py", line 323, in setattr
super(Network, self).setattr(name, value)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/base_layer.py", line 1215, in setattr
if not _DISABLE_TRACKING.value:
AttributeError: '_thread._local' object has no attribute 'value'

Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 207, in run
action, policy = self.get_action(history)
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 327, in get_action
policy = self.local_actor.predict(history)[0]
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training.py", line 1462, in predict
callbacks=callbacks)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training_arrays.py", line 276, in predict_loop
callbacks.model.stop_training = False
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/network.py", line 323, in setattr
super(Network, self).setattr(name, value)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/base_layer.py", line 1215, in setattr
if not _DISABLE_TRACKING.value:
AttributeError: '_thread._local' object has no attribute 'value'

Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 207, in run
action, policy = self.get_action(history)
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 327, in get_action
policy = self.local_actor.predict(history)[0]
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training.py", line 1462, in predict
callbacks=callbacks)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training_arrays.py", line 276, in predict_loop
callbacks.model.stop_training = False
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/network.py", line 323, in setattr
super(Network, self).setattr(name, value)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/base_layer.py", line 1215, in setattr
if not _DISABLE_TRACKING.value:
AttributeError: '_thread._local' object has no attribute 'value'

Exception in thread Thread-6:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 207, in run
action, policy = self.get_action(history)
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 327, in get_action
policy = self.local_actor.predict(history)[0]
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training.py", line 1462, in predict
callbacks=callbacks)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training_arrays.py", line 276, in predict_loop
callbacks.model.stop_training = False
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/network.py", line 323, in setattr
super(Network, self).setattr(name, value)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/base_layer.py", line 1215, in setattr
if not _DISABLE_TRACKING.value:
AttributeError: '_thread._local' object has no attribute 'value'

Exception in thread Thread-7:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 207, in run
action, policy = self.get_action(history)
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 327, in get_action
policy = self.local_actor.predict(history)[0]
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training.py", line 1462, in predict
callbacks=callbacks)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training_arrays.py", line 276, in predict_loop
callbacks.model.stop_training = False
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/network.py", line 323, in setattr
super(Network, self).setattr(name, value)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/base_layer.py", line 1215, in setattr
if not _DISABLE_TRACKING.value:
AttributeError: '_thread._local' object has no attribute 'value'

Exception in thread Thread-8:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 207, in run
action, policy = self.get_action(history)
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 327, in get_action
policy = self.local_actor.predict(history)[0]
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training.py", line 1462, in predict
callbacks=callbacks)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training_arrays.py", line 276, in predict_loop
callbacks.model.stop_training = False
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/network.py", line 323, in setattr
super(Network, self).setattr(name, value)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/base_layer.py", line 1215, in setattr
if not _DISABLE_TRACKING.value:
AttributeError: '_thread._local' object has no attribute 'value'

Exception in thread Thread-9:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 207, in run
action, policy = self.get_action(history)
File "/home/name/AdvRL/reinforcement-learning/3-atari/1-breakout/breakout_a3c.py", line 327, in get_action
policy = self.local_actor.predict(history)[0]
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training.py", line 1462, in predict
callbacks=callbacks)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/training_arrays.py", line 276, in predict_loop
callbacks.model.stop_training = False
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/network.py", line 323, in setattr
super(Network, self).setattr(name, value)
File "/home/name/.local/lib/python3.5/site-packages/keras/engine/base_layer.py", line 1215, in setattr
if not _DISABLE_TRACKING.value:
AttributeError: '_thread._local' object has no attribute 'value'

@dnddnjs
Copy link
Contributor

dnddnjs commented Sep 28, 2019

keras에 이것과 비슷한 이슈를 찾아봤는데요. 아무래도 tensorflow 버전 문제인 것 같아요. tensorflow 버전 1.14.0에서 발생하는 이슈라고 합니다. 한 번 다른 버전의 tensorflow 로 테스트 해보시겠어요? 다음 이슈 참고 부탁드려요.
keras-team/keras#13336

@rhkatjd00
Copy link
Author

@dnddnjs
저자님 감사합니다
keras버전을 낮추니까 문제가 해결되었습니다
$pip3 install 'keras<2.3.0'

@dnddnjs
Copy link
Contributor

dnddnjs commented Sep 28, 2019

해결이 되어서 다행이에요-!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants