|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 | 4 | "cell_type": "code",
|
5 |
| - "execution_count": 1, |
| 5 | + "execution_count": null, |
6 | 6 | "metadata": {
|
7 | 7 | "colab": {},
|
8 | 8 | "colab_type": "code",
|
|
15 | 15 | },
|
16 | 16 | {
|
17 | 17 | "cell_type": "code",
|
18 |
| - "execution_count": 2, |
| 18 | + "execution_count": null, |
19 | 19 | "metadata": {
|
20 | 20 | "cellView": "form",
|
21 | 21 | "colab": {},
|
|
116 | 116 | "metadata": {},
|
117 | 117 | "outputs": [],
|
118 | 118 | "source": [
|
119 |
| - "!pip install -U tensorflow-addons" |
| 119 | + "!pip install -U tensorflow-addons\n", |
| 120 | + "!pip install nltk sklearn" |
120 | 121 | ]
|
121 | 122 | },
|
122 | 123 | {
|
|
132 | 133 | "#download data\n",
|
133 | 134 | "print(\"Downloading Dataset:\")\n",
|
134 | 135 | "!wget --quiet http://www.manythings.org/anki/deu-eng.zip\n",
|
135 |
| - "!unzip deu-eng.zip" |
| 136 | + "!unzip -o deu-eng.zip" |
136 | 137 | ]
|
137 | 138 | },
|
138 | 139 | {
|
|
159 | 160 | "import itertools\n",
|
160 | 161 | "from pickle import load\n",
|
161 | 162 | "from tensorflow.keras.utils import to_categorical\n",
|
162 |
| - "from keras.utils.vis_utils import plot_model\n", |
| 163 | + "from tensorflow.keras.utils import plot_model\n", |
163 | 164 | "from tensorflow.keras.models import Sequential\n",
|
164 | 165 | "from tensorflow.keras.layers import LSTM\n",
|
165 | 166 | "from tensorflow.keras.layers import Dense\n",
|
166 | 167 | "from tensorflow.keras.layers import Embedding\n",
|
167 | 168 | "from pickle import load\n",
|
168 | 169 | "import random\n",
|
169 | 170 | "import tensorflow as tf\n",
|
170 |
| - "from keras.models import load_model\n", |
| 171 | + "from tensorflow.keras.models import load_model\n", |
171 | 172 | "from nltk.translate.bleu_score import corpus_bleu\n",
|
172 | 173 | "from sklearn.model_selection import train_test_split\n",
|
173 | 174 | "import tensorflow_addons as tfa"
|
|
187 | 188 | },
|
188 | 189 | {
|
189 | 190 | "cell_type": "code",
|
190 |
| - "execution_count": 2, |
| 191 | + "execution_count": null, |
191 | 192 | "metadata": {
|
192 | 193 | "colab": {},
|
193 | 194 | "colab_type": "code",
|
|
366 | 367 | },
|
367 | 368 | {
|
368 | 369 | "cell_type": "code",
|
369 |
| - "execution_count": 4, |
| 370 | + "execution_count": null, |
370 | 371 | "metadata": {
|
371 | 372 | "colab": {},
|
372 | 373 | "colab_type": "code",
|
|
389 | 390 | },
|
390 | 391 | {
|
391 | 392 | "cell_type": "code",
|
392 |
| - "execution_count": 5, |
| 393 | + "execution_count": null, |
393 | 394 | "metadata": {
|
394 | 395 | "colab": {},
|
395 | 396 | "colab_type": "code",
|
|
414 | 415 | },
|
415 | 416 | {
|
416 | 417 | "cell_type": "code",
|
417 |
| - "execution_count": 6, |
| 418 | + "execution_count": null, |
418 | 419 | "metadata": {
|
419 | 420 | "colab": {},
|
420 | 421 | "colab_type": "code",
|
|
479 | 480 | },
|
480 | 481 | {
|
481 | 482 | "cell_type": "code",
|
482 |
| - "execution_count": 8, |
| 483 | + "execution_count": null, |
483 | 484 | "metadata": {
|
484 | 485 | "colab": {},
|
485 | 486 | "colab_type": "code",
|
|
546 | 547 | },
|
547 | 548 | {
|
548 | 549 | "cell_type": "code",
|
549 |
| - "execution_count": 10, |
| 550 | + "execution_count": null, |
550 | 551 | "metadata": {
|
551 | 552 | "colab": {},
|
552 | 553 | "colab_type": "code",
|
|
615 | 616 | },
|
616 | 617 | {
|
617 | 618 | "cell_type": "code",
|
618 |
| - "execution_count": 11, |
| 619 | + "execution_count": null, |
619 | 620 | "metadata": {
|
620 | 621 | "colab": {},
|
621 | 622 | "colab_type": "code",
|
|
821 | 822 | },
|
822 | 823 | "kernelspec": {
|
823 | 824 | "display_name": "Python 3",
|
| 825 | + "language": "python", |
824 | 826 | "name": "python3"
|
825 | 827 | }
|
826 | 828 | },
|
|
0 commit comments