adeshpande3 / Chatbot-Flask-Server

The Flask server that communicates with my FB Messenger chatbot
MIT License
58 stars 31 forks source link

Tensor flow error when starting up the flask server #1

Closed Arvind6353 closed 7 years ago

Arvind6353 commented 7 years ago

Getting the below error when starting up the server:. Please help

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [223,48 ] rhs shape= [223,112]

[[Node: save/Assign_7 = Assign[T=DT_FLOAT, _class=["loc:@embedding_rnn_seq2seq/rnn/embedding_wrapper/embed ding"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](embedding_rn n_seq2seq/rnn/embedding_wrapper/embedding, save/RestoreV2_7)]]

adeshpande3 commented 7 years ago

See https://github.com/adeshpande3/Facebook-Messenger-Bot/issues/9

Arvind6353 commented 7 years ago

Hi ,

After I ran the Seq2Seq.py i got the checklist and files and i added those to the flask server models folder. When i ran the app. Am getting empty responses for whatever data I input.

ids are coming as the following when I enter any text. [[33595] [33595] [33595] [33595] [33595] [33595] [33595] [33595] [33595] [33595] [33595] [33595] [33595] [33595] [33595]]

Can you help me with this ?

Thanks, Arvind

On Thu, Nov 23, 2017 at 10:08 PM, Adit Deshpande notifications@github.com wrote:

See adeshpande3/Facebook-Messenger-Bot#9 https://github.com/adeshpande3/Facebook-Messenger-Bot/issues/9

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/adeshpande3/Chatbot-Flask-Server/issues/1#issuecomment-346662271, or mute the thread https://github.com/notifications/unsubscribe-auth/AV_b5yHo9p_k4p9JAzBPkezj1cs6xqLZks5s5Z-jgaJpZM4QonyK .

adeshpande3 commented 7 years ago

You need to make sure you've trained the model for long enough. Lines 212-238 should train the model as well as show you what how the network responds to sample test screens.

Fleker commented 6 years ago

As an addendum, I had a similar problem that I had to solve by working backwards.

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [192] rhs shape= [448]

My LHS count was defined as 48, making the LHS side 192 by a multiplier of 4. To get it to match the RHS, I changed the count to 112. That resolved the error.