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

Chatbot responds to every question with "I am a not . " #47

Closed
Higgins2718 opened this issue Jan 30, 2017 · 6 comments
Closed

Chatbot responds to every question with "I am a not . " #47

Higgins2718 opened this issue Jan 30, 2017 · 6 comments

Comments

@Higgins2718
Copy link

Here are my results for "python main.py --test":
**Q: Hi
A: i 'm a not .

Q: Hi!
A: i 'm a not .

Q: Are you conscious?
A: i 'm a not .

Q: How are you?
A: i 'm a not .

Q: What is your name ?
A: i 'm a not .

Q: Are you alive ?
A: i 'm a not .

Q: Luke, I am your father!
A: i 'm a not .

Q: You shall not pass!
A: i 'm a not .

Q: I'm going to kill you!
A: i 'm a not .

Q: Are you ready ?
A: i 'm a not .

Q: When are you ready ?
A: i 'm a not .

Q: What color is the sky?
A: i 'm a not .

Q: How old are you ?
A: i 'm a not .

Q: Can you say 'Hello' ?
A: i 'm a not .

Q: Can you say 'French fries' ?
A: i 'm a not .

Q: Can you say Hello ?
A: i 'm a not .

Q: Can you say French fries ?
A: i 'm a not .

Q: Can you say yes ?
A: i 'm a not .

Q: Can you say no ?
A: i 'm a not .

Q: Is this sentence false ?
A: i 'm a not .
**


I didn't edit any of the source code-- I ran main.py for about an hour. It said in the docs that that time would give me some results. What am I doing wrong?
I've tried this multiple times, and I still encounter this program after training it. I've restarted the program, and even re-downloaded the repo, so it's not a glitch in my code. I'm pretty sure that I installed the dependencies correctly.
Any thoughts?

@Conchylicultor
Copy link
Owner

The training time greatly depends of your hardware and the parameters you give. You probably don't train the network enough. Wait a few more hours. The results from the doc where with using only very short sentences (--sentenceLength 5). With the default parameters, it will take much longer.

@d-w-h
Copy link

d-w-h commented Jan 30, 2017

Which settings would you recommend @Conchylicultor for a robust output using a high end GPU?

@eschnou
Copy link
Contributor

eschnou commented Jan 30, 2017

A key hyper-parameter to tune for performance on GPU is the batch size. Read this post for details on performance optimization, in short, a value of 256 or 512 is ideal: https://svail.github.io/rnn_perf/

Below is a snippet of test conversation after training with the following:

AWS EC2 p2.xlarge (1GPU with 12GB)
hiddensize: 2048
embeddingSize: 256
softmaxSampling: 1024
batchSize: 512
epochs: 50

Training time ~10 hours
loss on training set: 0,8 (seems I'm overfitting on this one)


Q: Hi
A: hi , how 'd your day go ?

Q: Hi!
A: jeeezzz !

Q: Are you conscious?
A: you 'll see for yourself .

Q: How are you?
A: tolerably well .

Q: What is your name ?
A: christian svenson .

Q: Are you alive ?
A: no .

Q: Luke, I am your father!
A: how are you , lou ?

Q: You shall not pass!
A: i do n't care , philip .

Q: I'm going to kill you!
A: i 'm not going anywhere !

Q: Are you ready ?
A: ready as i 'll ever be .

Q: When are you ready ?
A: tomorrow morning , nine meters .

Q: What color is the sky?
A: the safest 20th century .

Q: How old are you ?
A: thirty-five .

Q: Can you say 'Hello' ?
A: i 'll have to finish my car .

Q: Can you say 'French fries' ?
A: sure .

Q: Can you say Hello ?
A: later .

Q: Can you say French fries ?
A: yeah . but i 've been thinking .

Q: Can you say yes ?
A: no . i 'm not tired .

Q: Can you say no ?
A: sure . let 's get outta here .

Q: Is this sentence false ?
A: just one way !

Q: How do you say hello in french?
A: oh , i do n't know .

Q: Speak french.
A: who 's in this box ?

Q: Bonjour.
A: good morning .

Q: Bonjour ?
A: hi , bob .

Q: Hello world!
A: who 's this , vince ?

Q: Netflix and chill ?
A: and terror .

Q: Good night.
A: good night ,

Q: Are you ok ?
A: yes . i 'm fine .

Q: Will Google hire me ?
A: uh-huh . but what 's going on ?

Q: Tell me the alphabet ?
A: solis 's unabridged .

Q: Tell me the alphabet, please ?
A: forget it .

Q: What is the first letter of the alphabet ?
A: they 're all the same .

Q: What is a letter of the alphabet ?
A: it 's a tachyon chamber .

Q: How is John ?
A: legal , really , real good .

Q: How is Oliver ?
A: terrible .

Q: How is Laura ?
A: terrible .

Q: How is Jenny ?
A: terrible . boring .

Q: Who is John ?
A: my employer , my lord .

Q: Who is Oliver ?
A: my baby .

Q: Who is Laura ?
A: my name is kazim .

@Higgins2718
Copy link
Author

Higgins2718 commented Jan 30, 2017

@Conchylicultor I left it in overnight, so it's been training for 12 hours. Now, it responds to everything with i 'm not a little .
Any other suggestions?

@Conchylicultor
Copy link
Owner

You can see if the network is still learning by looking at the loss using TensorBoard. During the first iterations, the network usually only predict the same sentences as in your case.
You probably don't have a fast GPU, or train a network which is to big for your hardware.

@julien-c
Copy link
Contributor

@eschnou Am I right in assuming that the non-zero --softmaxSamples flag is very important here, otherwise it would be very long to train?

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

5 participants