adeshpande3 / Facebook-Messenger-Bot

Facebook chatbot that I trained to talk like me using Seq2Seq

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blank output during training.

Sid2697 opened this issue · comments

First of all, I would like to thank you for such an amazing repo.
Right now I'm facing an issue which is that I'm not getting any output while training the model.
I'm getting a blank list for every input.
I'm attaching the screenshot so that you can get a better picture of the issue.
screen shot 2018-11-07 at 9 47 22 am

At the beginning of training, the network is likely just outputting pad or eos tokens. To double check that, you can go into the idsToSentence function and check what listOfResponses contains.

So, the fix could be in a couple of different places. One is to definitely try training for longer, another is to expand your dataset (not sure how large yours currently is), and another could be to choose a less complex model.

Thanks a lot, I checked listOfResponses and it was showing that the response is pad and eos tokens.
I increased the dataset and after training for reasonable amount of time it started giving me outputs.

I would like to know the way we should write a python script to use the trained model locally on the PC itself.

Not completely sure about that. What do you mean by locally on the PC? What type of applications would it be used on?

Yes, I want to run it locally on the PC.
I want to use it in a tkinter program from where I'll get the input and show the output of the trained model in the window or terminal itself.

Haven't used tkinter myself, but I assume you would just create a python script that contains most of the code in Seq2Seq.py and you'd remove the training loop and uncomment this line so that you restore a previously trained model instead of training from scratch.

Thanks a lot for the suggestion. I'll try this and let you know if that work. If it works we can add it to this project itself.

Hey, I have developed the tkinter window that uses the modified Seq2Seq code to get output from the terminal itself. Do let me know if you wish to check it out.