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

TypeError: 'module' object is not callable when executing train_bot.py #20

Closed Anoopparjanya closed 6 years ago

Anoopparjanya commented 6 years ago

@oswaldoludwig Thanks for this repository. Its really very useful and also helping me a lot!!

When i run this pre-trained model on my data set,i'm getting the below error in train_bot.py.

Using Theano backend. WARNING (theano.configdefaults): install mkl with conda install mkl-service: No module named 'mkl' WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. Found 400000 word vectors.

Warning (from warnings module): File "C:\Users\Anoop\Documents\Seq2seq-Chatbot-for-Keras-master\train_bot.py", line 101 LSTM_encoder = LSTM(sentence_embedding_size, init= 'lecun_uniform') UserWarning: Update your LSTM call to the Keras 2 API: LSTM(300, kernel_initializer="lecun_uniform")

Warning (from warnings module): File "C:\Users\Anoop\Documents\Seq2seq-Chatbot-for-Keras-master\train_bot.py", line 102 LSTM_decoder = LSTM(sentence_embedding_size, init= 'lecun_uniform') UserWarning: Update your LSTM call to the Keras 2 API: LSTM(300, kernel_initializer="lecun_uniform") Traceback (most recent call last): File "C:\Users\Anoop\Documents\Seq2seq-Chatbot-for-Keras-master\train_bot.py", line 113, in merge_layer = merge([context_embedding, answer_embedding], mode='concat', concat_axis=1) TypeError: 'module' object is not callable

I have tried doing R&D to find out what's going wrong.But i could not able to find out. Please help me out.

Thanks in Advance!!

oswaldoludwig commented 6 years ago

First you have to install all these dependencies correctly.

Anoopparjanya commented 6 years ago

I have installed all the dependencies correctly!!

Could you please let me know what I have to install ??

As per you notes,I have installed all the dependencies!

On Sun, 17 Jun 2018 at 1:26 AM, Oswaldo Ludwig notifications@github.com wrote:

Closed #20 https://github.com/oswaldoludwig/Seq2seq-Chatbot-for-Keras/issues/20.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/oswaldoludwig/Seq2seq-Chatbot-for-Keras/issues/20#event-1684760939, or mute the thread https://github.com/notifications/unsubscribe-auth/Alehgl9ZU6K2Zpr87Gmc72NKWUUFDVzgks5t9WMCgaJpZM4Uppez .

oswaldoludwig commented 6 years ago

You have to read the warning messages, there is important information there: install mkl with conda install mkl-service; Update your LSTM call to the Keras 2 API: LSTM(300, kernel_initializer="lecun_uniform") Sorry, but I cannot help you anymore. Good luck!

Anoopparjanya commented 6 years ago

@oswaldoludwig

I apologise for troubling you.As i told this is my first Sequence model im trying,facing with minor issues where i have resolved with your valuable suggestions.

Many thanks!!

Finally i'm facing with an issue where you have also addressed in https://github.com/keras-team/keras/issues/3657.

How to resolve this issue??

issue2

I urge you to please help me out!!