Add WMT translation example.#133
Merged
Merged
Conversation
bastings
reviewed
Mar 27, 2020
Merged
marcvanzee
suggested changes
Apr 3, 2020
marcvanzee
left a comment
Contributor
There was a problem hiding this comment.
Some comments on the preprocessing. I haven't looked at the rest yet.
marcvanzee
suggested changes
Apr 8, 2020
Co-Authored-By: Marc van Zee <marcvanzee@gmail.com>
marcvanzee
suggested changes
Apr 10, 2020
marcvanzee
left a comment
Contributor
There was a problem hiding this comment.
I left some more comments on train.py. I didn't get all the details of the fast decoding, but I can dig into this after this PR as well. I'll now take a look at the remaining model.py and decode.py.
marcvanzee
suggested changes
Apr 10, 2020
Co-Authored-By: Marc van Zee <marcvanzee@gmail.com>
marcvanzee
approved these changes
Apr 16, 2020
bastings
reviewed
Apr 16, 2020
| lambda x: {'inputs': x[features_info.supervised_keys[0]], | ||
| 'targets': x[features_info.supervised_keys[1]]}) | ||
| train_data = train_data.map(to_features_dict) | ||
| eval_data = eval_data.map(to_features_dict) |
Contributor
There was a problem hiding this comment.
Can add num_parallel_calls here (~2x speedup)
Collaborator
Author
There was a problem hiding this comment.
yeah this input pipeline is terrible - I'll have a new one coming soon in another PR.
bastings
approved these changes
Apr 16, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the first public version of a full encoder-decoder transformer model.
NB: At the moment this uses a simple dynamic bucketing approach to batching sentences, which trains much more slowly than when using a multiple-sentence-packing method. The model here already supports packed-examples and segmented-attention, we just need to add a preprocessing pass to the tfds-based pipeline.