Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
thtrieu committed Aug 16, 2019
2 parents 79be9b6 + 556817a commit f36b701
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions colab/Sentiment_Analysis_+_Back_translation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,12 @@
"source": [
"# Back-translate\n",
"\n",
"You can surely perform beam search decoding one sentence after another until finish. This, however, would take a very long time. Our code helps you with handling all possible speedups you can make:\n",
"You can surely perform beam search decoding one sentence after another until finish. This, however, would take a very long time, even with this dataset of only 27K examples. Our code helps you with handling all possible speedups you can make:\n",
"\n",
"* Decoding on ML accelerator hardware.\n",
"* Decoding on ML accelerator hardware (GPU or TPU).\n",
"* Batch processing of sentences.\n",
"* Processing sentences of similar length at the same time.\n",
"* Saving intermediate results during the process.\n",
"* Saving intermediate results during the process to deal with Colab Notebook preemtions.\n",
"\n",
"At its core, the `back_translate.py` script essentially packages two calls to `t2t-decode` from vi -> en and then en -> vi. We added the ability to save intermediate results after every single batch of data since back-translating the full dataset can take quite a long time."
]
Expand All @@ -518,7 +518,7 @@
"source": [
"output_file = os.path.join(foody_data_dir, 'foody_paraphrased_train.txt')\n",
"\n",
"is_demo = False #@param {type:\"boolean\"}\n",
"is_demo = True #@param {type:\"boolean\"}\n",
"from_ckpt = '/content/vien-translation/checkpoints/translate_vien_iwslt32k_tiny/avg/' # @param{type: \"string\"}\n",
"to_ckpt = '/content/vien-translation/checkpoints/translate_envi_iwslt32k_tiny/avg/' # @param{type: \"string\"}\n",
"\n",
Expand Down

0 comments on commit f36b701

Please sign in to comment.