-
Notifications
You must be signed in to change notification settings - Fork 93
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
base: master
Are you sure you want to change the base?
Conversation
The test failure is being investigated in #44. |
7fd8760
to
19bc169
Compare
# Helper utilities | ||
sutils = SamplingBase() | ||
unk_idx = config['unk_id'] | ||
src_eos_idx = config['src_vocab_size'] - 1 |
There was a problem hiding this comment.
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
?
trans, costs = \ | ||
beam_search.search( | ||
input_values={sampling_input: input_}, | ||
max_length=3*len(seq), eol_symbol=src_eos_idx, |
There was a problem hiding this comment.
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.
#33