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

Kerlym failing using Tensorflow #17

Open
ethene opened this issue Feb 25, 2017 · 1 comment
Open

Kerlym failing using Tensorflow #17

ethene opened this issue Feb 25, 2017 · 1 comment

Comments

@ethene
Copy link

ethene commented Feb 25, 2017

any examples and even just simply running kerlym gives an error as below:

kerlym
Using TensorFlow backend.
dqn
<function simple_dnn at 0x7f9cb7310500>
1e-06
[2017-02-25 13:10:08,625] Making new env: Pong-v0
201600 [2, 210, 160, 3]
Traceback (most recent call last):
File "/usr/local/bin/kerlym", line 4, in
import('pkg_resources').run_script('KeRLym==0.0.2', 'kerlym')
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 738, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 1506, in run_script
exec(script_code, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/KeRLym-0.0.2-py2.7.egg/EGG-INFO/scripts/kerlym", line 77, in

File "build/bdist.linux-x86_64/egg/kerlym/dqn/dqn.py", line 117, in train
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 766, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 964, in _run
feed_dict_string, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1014, in _do_run
target_list, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1034, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.FailedPreconditionError: Attempting to use uninitialized value dense_3_b
[[Node: dense_3_b/read = IdentityT=DT_FLOAT, _class=["loc:@dense_3_b"], _device="/job:localhost/replica:0/task:0/cpu:0"]]

Caused by op u'dense_3_b/read', defined at:
File "/usr/local/bin/kerlym", line 4, in
import('pkg_resources').run_script('KeRLym==0.0.2', 'kerlym')
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 738, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 1506, in run_script
exec(script_code, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/KeRLym-0.0.2-py2.7.egg/EGG-INFO/scripts/kerlym", line 75, in
File "build/bdist.linux-x86_64/egg/kerlym/dqn/dqn.py", line 77, in init
self.setup_graphs()
File "build/bdist.linux-x86_64/egg/kerlym/dqn/dqn.py", line 83, in setup_graphs
s, q_network = self.model_factory(self, self.env[0], **self.kwargs)
File "build/bdist.linux-x86_64/egg/kerlym/dqn/networks.py", line 23, in simple_dnn
V = Dense(env.action_space.n, activation='linear',init='zero')(h)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 546, in call
self.build(input_shapes[0])
File "/usr/local/lib/python2.7/dist-packages/keras/layers/core.py", line 804, in build
constraint=self.b_constraint)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 418, in add_weight
weight = initializer(shape, name=name)
File "/usr/local/lib/python2.7/dist-packages/keras/initializations.py", line 112, in zero
return K.zeros(shape, name=name)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 492, in zeros
dtype, name)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 259, in variable
v = tf.Variable(value, dtype=_convert_string_dtype(dtype), name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 224, in init
expected_shape=expected_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 370, in _init_from_args
self._snapshot = array_ops.identity(self._variable, name="read")
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 1424, in identity
result = _op_def_lib.apply_op("Identity", input=input, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 759, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1128, in init
self._traceback = _extract_stack()

FailedPreconditionError (see above for traceback): Attempting to use uninitialized value dense_3_b
[[Node: dense_3_b/read = IdentityT=DT_FLOAT, _class=["loc:@dense_3_b"], _device="/job:localhost/replica:0/task:0/cpu:0"]]

@ethene
Copy link
Author

ethene commented Feb 25, 2017

on Ubuntu:

appdirs (1.4.0)
atari-py (0.0.18)
backports.ssl-match-hostname (3.5.0.1)
box2d-py (2.3.1)
coloredlogs (5.2)
cycler (0.10.0)
funcsigs (1.0.2)
functools32 (3.2.3.post2)
gevent (1.2.1)
graphviz (0.5.2)
greenlet (0.4.11)
gym (0.7.3)
h5py (2.6.0)
hanging-threads (2.0.3)
humanfriendly (2.3.2)
imageio (2.1.2)
johansen (0.0.4)
Keras (1.2.2)
KeRLym (0.0.2)
matplotlib (2.0.0)
mock (2.0.0)
monotonic (1.2)
mujoco-py (0.5.7)
mysql-connector-python (2.1.5)
mysqlclient (1.3.7)
numpy (1.12.0)
olefile (0.44)
pachi-py (0.0.21)
packaging (16.8)
pandas (0.19.2)
pandas-datareader (0.3.0.post0)
patsy (0.4.1)
pbr (1.10.0)
Pillow (4.0.0)
pip (9.0.1)
poster (0.8.1)
protobuf (3.2.0)
pubnub (3.9.0)
pycryptodomex (3.4.3)
pydot (1.0.29)
pyglet (1.2.4)
pykalman (0.9.5)
PyOpenGL (3.1.0)
pyparsing (2.1.10)
python-apt (1.1.0b1)
python-augeas (0.5.0)
python-dateutil (2.6.0)
pytz (2016.10)
PyYAML (3.12)
qlearning4k (0.0.1)
requests (2.13.0)
requests-file (1.4.1)
requests-ftp (0.3.1)
scikit-learn (0.18.1)
scipy (0.18.1)
setuptools (34.2.0)
six (1.10.0)
sklearn (0.0)
socketIO-client (0.7.2)
SQLAlchemy (1.1.5)
statsmodels (0.6.1)
subprocess32 (3.2.7)
tensorflow (0.12.1)
Theano (0.8.2)
Unirest (1.1.7)
websocket-client (0.40.0)
wheel (0.29.0)

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

1 participant