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

translating a test file using a trained model #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

orhanf
Copy link
Contributor

@orhanf orhanf commented Sep 24, 2015

#33

@rizar rizar mentioned this pull request Sep 28, 2015
@rizar
Copy link
Contributor

rizar commented Sep 28, 2015

The test failure is being investigated in #44.

# Helper utilities
sutils = SamplingBase()
unk_idx = config['unk_id']
src_eos_idx = config['src_vocab_size'] - 1
Copy link

@tnq177 tnq177 May 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @orhanf I check in preprocess.py when creating dictionary, they set eos_idx to be 0. Should this be 0 instead of config['src_vocab_size'] - 1?

@orhanf
Copy link
Contributor Author

orhanf commented May 9, 2016

@tnq177 that part is okay since we use 'src_vocab_size - 1' in our data stream, please check here

trans, costs = \
beam_search.search(
input_values={sampling_input: input_},
max_length=3*len(seq), eol_symbol=src_eos_idx,
Copy link

@tnq177 tnq177 May 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orhanf I'm not sure about this but when I tested on a small dataset, I saw the </S> symbol everywhere in the middle of translated sentences. After changing the src_eos_idx to 0, the problem was fixed. I'm gonna double check my result again then.

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

Successfully merging this pull request may close these issues.

3 participants