Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
89e30510
Unverified
Commit
89e30510
authored
Jul 30, 2018
by
Mark Daoust
Committed by
GitHub
Jul 30, 2018
Browse files
Merge pull request #4933 from DecentGradient/patch-1
Use NUM_WORDS in input_shape
parents
22e248ce
c94d1d29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
samples/core/tutorials/keras/overfit_and_underfit.ipynb
samples/core/tutorials/keras/overfit_and_underfit.ipynb
+5
-5
No files found.
samples/core/tutorials/keras/overfit_and_underfit.ipynb
View file @
89e30510
...
...
@@ -294,7 +294,7 @@
"cell_type": "code",
"source": [
"baseline_model = keras.Sequential([\n",
" keras.layers.Dense(16, activation=tf.nn.relu, input_shape=(
10000
,)),\n",
" keras.layers.Dense(16, activation=tf.nn.relu, input_shape=(
NUM_WORDS
,)),\n",
" keras.layers.Dense(16, activation=tf.nn.relu),\n",
" keras.layers.Dense(1, activation=tf.nn.sigmoid)\n",
"])\n",
...
...
@@ -365,7 +365,7 @@
"cell_type": "code",
"source": [
"smaller_model = keras.Sequential([\n",
" keras.layers.Dense(4, activation=tf.nn.relu, input_shape=(
10000
,)),\n",
" keras.layers.Dense(4, activation=tf.nn.relu, input_shape=(
NUM_WORDS
,)),\n",
" keras.layers.Dense(4, activation=tf.nn.relu),\n",
" keras.layers.Dense(1, activation=tf.nn.sigmoid)\n",
"])\n",
...
...
@@ -438,7 +438,7 @@
"cell_type": "code",
"source": [
"bigger_model = keras.models.Sequential([\n",
" keras.layers.Dense(512, activation=tf.nn.relu, input_shape=(
10000
,)),\n",
" keras.layers.Dense(512, activation=tf.nn.relu, input_shape=(
NUM_WORDS
,)),\n",
" keras.layers.Dense(512, activation=tf.nn.relu),\n",
" keras.layers.Dense(1, activation=tf.nn.sigmoid)\n",
"])\n",
...
...
@@ -606,7 +606,7 @@
"source": [
"l2_model = keras.models.Sequential([\n",
" keras.layers.Dense(16, kernel_regularizer=keras.regularizers.l2(0.001),\n",
" activation=tf.nn.relu, input_shape=(
10000
,)),\n",
" activation=tf.nn.relu, input_shape=(
NUM_WORDS
,)),\n",
" keras.layers.Dense(16, kernel_regularizer=keras.regularizers.l2(0.001),\n",
" activation=tf.nn.relu),\n",
" keras.layers.Dense(1, activation=tf.nn.sigmoid)\n",
...
...
@@ -697,7 +697,7 @@
"cell_type": "code",
"source": [
"dpt_model = keras.models.Sequential([\n",
" keras.layers.Dense(16, activation=tf.nn.relu, input_shape=(
10000
,)),\n",
" keras.layers.Dense(16, activation=tf.nn.relu, input_shape=(
NUM_WORDS
,)),\n",
" keras.layers.Dropout(0.5),\n",
" keras.layers.Dense(16, activation=tf.nn.relu),\n",
" keras.layers.Dropout(0.5),\n",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment