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

eroor while running conversation.py #24

Open
sheenNapoleon opened this issue Nov 7, 2018 · 1 comment
Open

eroor while running conversation.py #24

sheenNapoleon opened this issue Nov 7, 2018 · 1 comment

Comments

@sheenNapoleon
Copy link

Traceback (most recent call last):
File "D:\Seq2seq-Chatbot-for-Keras-master\conversation.py", line 151, in
out = Dense(dictionary_size/2, activation="relu", name='relu-activation')(merge_layer)
File "C:\Users\sheen\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\base_layer.py", line 431, in call
self.build(unpack_singleton(input_shapes))
File "C:\Users\sheen\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\layers\core.py", line 866, in build
constraint=self.kernel_constraint)
File "C:\Users\sheen\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "C:\Users\sheen\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\base_layer.py", line 249, in add_weight
weight = K.variable(initializer(shape),
File "C:\Users\sheen\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\initializers.py", line 218, in call
dtype=dtype, seed=self.seed)
File "C:\Users\sheen\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\backend\tensorflow_backend.py", line 4139, in random_uniform
dtype=dtype, seed=seed)
File "C:\Users\sheen\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\random_ops.py", line 244, in random_uniform
shape, dtype, seed=seed1, seed2=seed2)
File "C:\Users\sheen\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\gen_random_ops.py", line 473, in _random_uniform
name=name)
File "C:\Users\sheen\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 609, in _apply_op_helper
param_name=input_name)
File "C:\Users\sheen\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 60, in _SatisfiesTypeConstraint
", ".join(dtypes.as_dtype(x).name for x in allowed_list)))
TypeError: Value passed to parameter 'shape' has DataType float32 not in list of allowed values: int32, int64

@TuanHAnhVN
Copy link

TuanHAnhVN commented Nov 13, 2018

I think you should change backend of keras to theano. by the following solution:
import os
os.environ['KERAS_BACKEND'] = 'theano'

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