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

Neural Machine Translation with Attention #20084

Merged
merged 7 commits into from
Jun 18, 2018
Merged

Neural Machine Translation with Attention #20084

merged 7 commits into from
Jun 18, 2018

Conversation

yashk2810
Copy link
Member

Added Neural Machine Translation with Attention notebook

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@yashk2810
Copy link
Member Author

I signed it

@googlebot
Copy link

CLAs look good, thanks!

@yashk2810 yashk2810 changed the title Nmt attention Neural Machine Translation with Attention Jun 17, 2018
@yashk2810
Copy link
Member Author

@alextp

},
"cell_type": "code",
"source": [
"# first we remove the pronumciations\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

pronunciations

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

" \n",
" # If you have a GPU, we recommend using CuDNNGRU(provides a 3x speedup than GRU)\n",
" # the code automatically does that.\n",
" if tf.test.is_gpu_available():\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Refactor this into a GRU function so you can remove the duplicates?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

" # passing enc_output to the decoder\n",
" predictions, dec_hidden, _ = decoder(dec_input, dec_hidden, enc_output)\n",
" \n",
" loss += loss_function(targ[:, t], predictions)\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you also need to worry here about sequences of different lengths, by masking the loss

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@qlzh727 qlzh727 added the stat:awaiting response Status - Awaiting response from author label Jun 18, 2018
@alextp alextp added awaiting testing (then merge) kokoro:force-run Tests on submitted change and removed stat:awaiting response Status - Awaiting response from author labels Jun 18, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jun 18, 2018
@alextp alextp merged commit 890c293 into tensorflow:master Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants