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

Problems with coverage penalty #35

Closed
yftah89 opened this issue Jan 30, 2018 · 2 comments
Closed

Problems with coverage penalty #35

yftah89 opened this issue Jan 30, 2018 · 2 comments

Comments

@yftah89
Copy link

yftah89 commented Jan 30, 2018

Hi :)
When I'm changing the coverage to true :
COVERAGE_PENALTY = True # Apply source coverage penalty
COVERAGE_NORM_FACTOR = 0.2 # Coverage penalty factor

I get the following error on evaluation time :
nmt-keras/src/keras-wrapper/keras_wrapper/cnn_model.py", line 2140, in predictBeamSearchNet
length_penalties = [1.0 for _ in len(samples)]
TypeError: 'int' object is not iterable

I don't know if its matter but the length penalty is still set to False.
I think that the same problem will return on line 2272 in the same file:
coverage_penalties = [0.0 for _ in len(samples)]

Thanks again for all of your help, I'm really appreciating it .

@lvapeab
Copy link
Owner

lvapeab commented Jan 30, 2018

Hello @yftah89 ,

thank you for noticing it. I've fixed that bug (lvapeab/multimodal_keras_wrapper@3b2cc5f). You should update the Multimodal Keras Wrapper.

Cheers!

@yftah89
Copy link
Author

yftah89 commented Jan 30, 2018

Thanks :)
working just fine now.

@yftah89 yftah89 closed this as completed Jan 30, 2018
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