oswaldoludwig / Seq2seq-Chatbot-for-Keras

This repository contains a new generative model of chatbot based on seq2seq modeling.
Apache License 2.0
331 stars 98 forks source link

Python 3.7.x Theano AssertionError when starting the model in conversation.py #27

Open newsbubbles opened 4 years ago

newsbubbles commented 4 years ago
Starting the model...
Traceback (most recent call last):
  File "c:\...\conversation.py", line 156, in <module>
    out = Dense(dictionary_size/2, activation="relu", name='relu activation')(me
rge_layer)
  File "c:\...\venv\lib\site-packages\keras\engine\base_layer.py",
line 463, in __call__
    self.build(unpack_singleton(input_shapes))
  File "c:\...\venv\lib\site-packages\keras\layers\core.py", line 8
95, in build
    constraint=self.kernel_constraint)
  File "c:\...\venv\lib\site-packages\keras\engine\base_layer.py",
line 279, in add_weight
    weight = K.variable(initializer(shape, dtype=dtype),
  File "c:\...\venv\lib\site-packages\keras\initializers.py", line
227, in __call__
    dtype=dtype, seed=self.seed)
  File "c:\...\venv\lib\site-packages\keras\backend\theano_backend.
py", line 2706, in random_uniform
    return rng.uniform(shape, low=minval, high=maxval, dtype=dtype)
  File "c:\...\venv\lib\site-packages\theano\sandbox\rng_mrg.py", l
ine 857, in uniform
    for i in size]), msg
AssertionError: size must be a tuple of int or a Theano variable

Is that talking about the dictionary size not being a Theano variable? I'm just trying to run conversation.py and I'm getting this error (among others I think I've fixed)

Any idea on what to do to fix?

oswaldoludwig commented 4 years ago

"... These codes can run in Ubuntu 14.04.3 LTS, Python 2.7.6, Theano 0.9.0, and Keras 2.0.4. The use of another configuration may require some minor adaptations"

newsbubbles commented 4 years ago

okay, thanks for the reply... I'm not sure how many other adaptations I need to go through, but this one I just don't have enough knowledge using theano to figure out easily. Do you know what the error means?