-
Notifications
You must be signed in to change notification settings - Fork 44
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
base: master
Are you sure you want to change the base?
Conversation
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.
One comment is inline, otherwise LGTM (did not check for correctness though).
|
||
def __init__(self): | ||
@serializable_init | ||
def __init__(self, src_file, trg_file): |
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.
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
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.
I agree with @msperber here. @cindyxinyiwang, could you take a look at it?
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.
Please take a look at @msperber 's comment.
@cindyxinyiwang Ping? |
sorry I forgot about this...will work on it soon! |
modified length stats object so that it can be passed to Gaussian Normalization; add two other conditions for using Gaussian Normalization.