Skip to content

Fix imports and layer naming #2129

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

Merged
merged 1 commit into from
Aug 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/tutorials/average_optimizers_callback.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"!pip install -U tensorflow-addons"
Expand Down Expand Up @@ -167,8 +169,8 @@
"def create_model(opt):\n",
" model = tf.keras.models.Sequential([\n",
" tf.keras.layers.Flatten(), \n",
" tf.keras.layers.Dense(64, activation='relu', name='dense_1'),\n",
" tf.keras.layers.Dense(64, activation='relu', name='dense_2'),\n",
" tf.keras.layers.Dense(64, activation='relu'),\n",
" tf.keras.layers.Dense(64, activation='relu'),\n",
" tf.keras.layers.Dense(10, activation='softmax')\n",
" ])\n",
"\n",
Expand Down Expand Up @@ -454,6 +456,7 @@
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
}
},
Expand Down
28 changes: 15 additions & 13 deletions docs/tutorials/networks_seq2seq_nmt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
Expand All @@ -15,7 +15,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"cellView": "form",
"colab": {},
Expand Down Expand Up @@ -116,7 +116,8 @@
"metadata": {},
"outputs": [],
"source": [
"!pip install -U tensorflow-addons"
"!pip install -U tensorflow-addons\n",
"!pip install nltk sklearn"
]
},
{
Expand All @@ -132,7 +133,7 @@
"#download data\n",
"print(\"Downloading Dataset:\")\n",
"!wget --quiet http://www.manythings.org/anki/deu-eng.zip\n",
"!unzip deu-eng.zip"
"!unzip -o deu-eng.zip"
]
},
{
Expand All @@ -159,15 +160,15 @@
"import itertools\n",
"from pickle import load\n",
"from tensorflow.keras.utils import to_categorical\n",
"from keras.utils.vis_utils import plot_model\n",
"from tensorflow.keras.utils import plot_model\n",
"from tensorflow.keras.models import Sequential\n",
"from tensorflow.keras.layers import LSTM\n",
"from tensorflow.keras.layers import Dense\n",
"from tensorflow.keras.layers import Embedding\n",
"from pickle import load\n",
"import random\n",
"import tensorflow as tf\n",
"from keras.models import load_model\n",
"from tensorflow.keras.models import load_model\n",
"from nltk.translate.bleu_score import corpus_bleu\n",
"from sklearn.model_selection import train_test_split\n",
"import tensorflow_addons as tfa"
Expand All @@ -187,7 +188,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
Expand Down Expand Up @@ -366,7 +367,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
Expand All @@ -389,7 +390,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
Expand All @@ -414,7 +415,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
Expand Down Expand Up @@ -479,7 +480,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
Expand Down Expand Up @@ -546,7 +547,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
Expand Down Expand Up @@ -615,7 +616,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
Expand Down Expand Up @@ -821,6 +822,7 @@
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
}
},
Expand Down