Skip to content

Commit 02e9989

Browse files
committed
#remove dropout
1 parent 4548536 commit 02e9989

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

2.NLP_PREP/2.1.1.tf.keras.layers.ipynb

+19-12
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
{
1818
"cell_type": "code",
19-
"execution_count": null,
19+
"execution_count": 1,
2020
"metadata": {},
2121
"outputs": [],
2222
"source": [
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"cell_type": "code",
28-
"execution_count": null,
28+
"execution_count": 2,
2929
"metadata": {},
3030
"outputs": [],
3131
"source": [
@@ -43,7 +43,7 @@
4343
},
4444
{
4545
"cell_type": "code",
46-
"execution_count": null,
46+
"execution_count": 3,
4747
"metadata": {},
4848
"outputs": [],
4949
"source": [
@@ -60,7 +60,7 @@
6060
},
6161
{
6262
"cell_type": "code",
63-
"execution_count": null,
63+
"execution_count": 4,
6464
"metadata": {},
6565
"outputs": [],
6666
"source": [
@@ -78,12 +78,12 @@
7878
},
7979
{
8080
"cell_type": "code",
81-
"execution_count": null,
81+
"execution_count": 10,
8282
"metadata": {},
8383
"outputs": [],
8484
"source": [
8585
"input = tf.placeholder(tf.float32, shape = INPUT_SIZE)\n",
86-
"dropout = tf.keras.layers.Dropout(rate = 0.5)(input, training = IS_TRAINING)"
86+
"dropout = tf.keras.layers.Dropout(rate = 0.5)(input)"
8787
]
8888
},
8989
{
@@ -95,7 +95,7 @@
9595
},
9696
{
9797
"cell_type": "code",
98-
"execution_count": null,
98+
"execution_count": 6,
9999
"metadata": {},
100100
"outputs": [],
101101
"source": [
@@ -114,7 +114,7 @@
114114
},
115115
{
116116
"cell_type": "code",
117-
"execution_count": null,
117+
"execution_count": 7,
118118
"metadata": {},
119119
"outputs": [],
120120
"source": [
@@ -140,7 +140,7 @@
140140
"outputs": [],
141141
"source": [
142142
"input = tf.placeholder(tf.float32, shape = CONV_INPUT_SIZE)\n",
143-
"dropout = tf.keras.layers.Dropout(rate=0.2)(input, training = IS_TRAINING)\n",
143+
"dropout = tf.keras.layers.Dropout(rate=0.2)(input)\n",
144144
"conv = tf.keras.layers.Conv1D(\n",
145145
" filters=10,\n",
146146
" kernel_size=3,\n",
@@ -157,12 +157,12 @@
157157
},
158158
{
159159
"cell_type": "code",
160-
"execution_count": null,
160+
"execution_count": 9,
161161
"metadata": {},
162162
"outputs": [],
163163
"source": [
164164
"input = tf.placeholder(tf.float32, shape = CONV_INPUT_SIZE)\n",
165-
"dropout = tf.keras.layers.Dropout(rate = 0.2)(input, training = IS_TRAINING)\n",
165+
"dropout = tf.keras.layers.Dropout(rate = 0.2)(input)\n",
166166
"conv = tf.keras.layers.Conv1D(\n",
167167
" filters=10,\n",
168168
" kernel_size=3,\n",
@@ -173,6 +173,13 @@
173173
"hidden = tf.keras.layers.Dense(units = 50, activation = tf.nn.relu)(flatten)\n",
174174
"output = tf.keras.layers.Dense(units = 10, activation = tf.nn.softmax)(hidden) "
175175
]
176+
},
177+
{
178+
"cell_type": "code",
179+
"execution_count": null,
180+
"metadata": {},
181+
"outputs": [],
182+
"source": []
176183
}
177184
],
178185
"metadata": {
@@ -191,7 +198,7 @@
191198
"name": "python",
192199
"nbconvert_exporter": "python",
193200
"pygments_lexer": "ipython3",
194-
"version": "3.6.8"
201+
"version": "3.6.4"
195202
}
196203
},
197204
"nbformat": 4,

0 commit comments

Comments
 (0)