Skip to content

Commit 3a5c12b

Browse files
committed
Change to tf.dtype
1 parent 9eb19b6 commit 3a5c12b

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

deep-learning/tensor-flow-examples/notebooks/3_neural_networks/alexnet.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@
8686
"outputs": [],
8787
"source": [
8888
"# tf Graph input\n",
89-
"x = tf.placeholder(tf.types.float32, [None, n_input])\n",
90-
"y = tf.placeholder(tf.types.float32, [None, n_classes])\n",
91-
"keep_prob = tf.placeholder(tf.types.float32) # dropout (keep probability)"
89+
"x = tf.placeholder(tf.float32, [None, n_input])\n",
90+
"y = tf.placeholder(tf.float32, [None, n_classes])\n",
91+
"keep_prob = tf.placeholder(tf.float32) # dropout (keep probability)"
9292
]
9393
},
9494
{
@@ -218,7 +218,7 @@
218218
"source": [
219219
"# Evaluate model\n",
220220
"correct_pred = tf.equal(tf.argmax(pred,1), tf.argmax(y,1))\n",
221-
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.types.float32))"
221+
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))"
222222
]
223223
},
224224
{
@@ -323,21 +323,21 @@
323323
],
324324
"metadata": {
325325
"kernelspec": {
326-
"display_name": "Python 3",
326+
"display_name": "Python 2",
327327
"language": "python",
328-
"name": "python3"
328+
"name": "python2"
329329
},
330330
"language_info": {
331331
"codemirror_mode": {
332332
"name": "ipython",
333-
"version": 3
333+
"version": 2
334334
},
335335
"file_extension": ".py",
336336
"mimetype": "text/x-python",
337337
"name": "python",
338338
"nbconvert_exporter": "python",
339-
"pygments_lexer": "ipython3",
340-
"version": "3.4.3"
339+
"pygments_lexer": "ipython2",
340+
"version": "2.7.5+"
341341
}
342342
},
343343
"nbformat": 4,

deep-learning/tensor-flow-examples/notebooks/3_neural_networks/convolutional_network.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@
8686
"outputs": [],
8787
"source": [
8888
"# tf Graph input\n",
89-
"x = tf.placeholder(tf.types.float32, [None, n_input])\n",
90-
"y = tf.placeholder(tf.types.float32, [None, n_classes])\n",
91-
"keep_prob = tf.placeholder(tf.types.float32) #dropout (keep probability)"
89+
"x = tf.placeholder(tf.float32, [None, n_input])\n",
90+
"y = tf.placeholder(tf.float32, [None, n_classes])\n",
91+
"keep_prob = tf.placeholder(tf.float32) #dropout (keep probability)"
9292
]
9393
},
9494
{
@@ -201,7 +201,7 @@
201201
"source": [
202202
"# Evaluate model\n",
203203
"correct_pred = tf.equal(tf.argmax(pred,1), tf.argmax(y,1))\n",
204-
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.types.float32))"
204+
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))"
205205
]
206206
},
207207
{
@@ -299,21 +299,21 @@
299299
],
300300
"metadata": {
301301
"kernelspec": {
302-
"display_name": "Python 3",
302+
"display_name": "Python 2",
303303
"language": "python",
304-
"name": "python3"
304+
"name": "python2"
305305
},
306306
"language_info": {
307307
"codemirror_mode": {
308308
"name": "ipython",
309-
"version": 3
309+
"version": 2
310310
},
311311
"file_extension": ".py",
312312
"mimetype": "text/x-python",
313313
"name": "python",
314314
"nbconvert_exporter": "python",
315-
"pygments_lexer": "ipython3",
316-
"version": "3.4.3"
315+
"pygments_lexer": "ipython2",
316+
"version": "2.7.5+"
317317
}
318318
},
319319
"nbformat": 4,

deep-learning/tensor-flow-examples/notebooks/3_neural_networks/recurrent_network.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"\n",
138138
"# Evaluate model\n",
139139
"correct_pred = tf.equal(tf.argmax(pred,1), tf.argmax(y,1))\n",
140-
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.types.float32))"
140+
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))"
141141
]
142142
},
143143
{
@@ -272,21 +272,21 @@
272272
],
273273
"metadata": {
274274
"kernelspec": {
275-
"display_name": "Python 3",
275+
"display_name": "Python 2",
276276
"language": "python",
277-
"name": "python3"
277+
"name": "python2"
278278
},
279279
"language_info": {
280280
"codemirror_mode": {
281281
"name": "ipython",
282-
"version": 3
282+
"version": 2
283283
},
284284
"file_extension": ".py",
285285
"mimetype": "text/x-python",
286286
"name": "python",
287287
"nbconvert_exporter": "python",
288-
"pygments_lexer": "ipython3",
289-
"version": "3.4.3"
288+
"pygments_lexer": "ipython2",
289+
"version": "2.7.5+"
290290
}
291291
},
292292
"nbformat": 4,

0 commit comments

Comments
 (0)