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

default training #4

Open
summerstay opened this issue Apr 29, 2020 · 2 comments
Open

default training #4

summerstay opened this issue Apr 29, 2020 · 2 comments

Comments

@summerstay
Copy link

I ran train.py with the default parameters. When I test it on sentences, even ones directly from the training set, the resulting sentences it generates seem pretty much random. Should I use a different set of training parameters?

@michalivne
Copy link
Collaborator

michalivne commented Apr 29, 2020 via email

@summerstay
Copy link
Author

summerstay commented Apr 29, 2020

I run train.py. The only parameter I add is the path to the ptb training file, so it is using all the defaults.
To test it, I am using a very short program I wrote that loads the trained model, converts the sentence to indexes (using w2i) and then calls model.encode to create a z vector (by default this seems to be length 16, which seems too small) and then use model.inference to decode that z vector. Here is the core part of the code:

z, mean, std = model.encode(inputsent,inputlen, return_mean=True, return_std=True)

output = model.inference(z=z)

print(idx2word(output[0], i2w=i2w, pad_idx=w2i['<pad>']))

every time I run this, it prints out a different sentence that seems unrelated to the sentence I input.

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

2 participants