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

adding features to Gaussian Normalization #479

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

Conversation

cindyxinyiwang
Copy link
Contributor

modified length stats object so that it can be passed to Gaussian Normalization; add two other conditions for using Gaussian Normalization.

Copy link
Contributor

@msperber msperber left a comment

Choose a reason for hiding this comment

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

One comment is inline, otherwise LGTM (did not check for correctness though).


def __init__(self):
@serializable_init
def __init__(self, src_file, trg_file):
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you document the arguments? Another thing to consider is that this design will cause the statistics to be recomputed even when loading a saved model. If this takes some amount of time or is otherwise inconvenient (e.g. because it requires keeping the files around at the same location), it would be possible to do something similar to the vocabs that only load the vocab from file if the i2w argument is not set, and then use saved_processed_arg() to store the result so that the vocab file will not need to be opened when loading the model: https://github.com/neulab/xnmt/blob/master/xnmt/vocab.py#L25

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @msperber here. @cindyxinyiwang, could you take a look at it?

Copy link
Contributor

@neubig neubig left a comment

Choose a reason for hiding this comment

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

Please take a look at @msperber 's comment.

@neubig
Copy link
Contributor

neubig commented Aug 16, 2018

@cindyxinyiwang Ping?

@cindyxinyiwang
Copy link
Contributor Author

sorry I forgot about this...will work on it soon!

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.

None yet

3 participants