Skip to content

Commit bd71848

Browse files
committed
Merge pull request #23 from AnishShah/master
Change tf.types.int16 to tf.int16
2 parents d56ab13 + 3a5c12b commit bd71848

File tree

4 files changed

+44
-35
lines changed

4 files changed

+44
-35
lines changed

deep-learning/tensor-flow-examples/notebooks/1_intro/basic_operations.ipynb

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
{
1717
"cell_type": "code",
18-
"execution_count": 2,
18+
"execution_count": 1,
1919
"metadata": {
2020
"collapsed": true
2121
},
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"cell_type": "code",
29-
"execution_count": 3,
29+
"execution_count": 2,
3030
"metadata": {
3131
"collapsed": true
3232
},
@@ -41,7 +41,7 @@
4141
},
4242
{
4343
"cell_type": "code",
44-
"execution_count": 4,
44+
"execution_count": 3,
4545
"metadata": {
4646
"collapsed": false
4747
},
@@ -68,16 +68,16 @@
6868
"cell_type": "code",
6969
"execution_count": 5,
7070
"metadata": {
71-
"collapsed": true
71+
"collapsed": false
7272
},
7373
"outputs": [],
7474
"source": [
7575
"# Basic Operations with variable as graph input\n",
7676
"# The value returned by the constructor represents the output\n",
7777
"# of the Variable op. (define as input when running session)\n",
7878
"# tf Graph input\n",
79-
"a = tf.placeholder(tf.types.int16)\n",
80-
"b = tf.placeholder(tf.types.int16)"
79+
"a = tf.placeholder(tf.int16)\n",
80+
"b = tf.placeholder(tf.int16)"
8181
]
8282
},
8383
{
@@ -194,25 +194,34 @@
194194
" result = sess.run(product)\n",
195195
" print result"
196196
]
197+
},
198+
{
199+
"cell_type": "code",
200+
"execution_count": null,
201+
"metadata": {
202+
"collapsed": true
203+
},
204+
"outputs": [],
205+
"source": []
197206
}
198207
],
199208
"metadata": {
200209
"kernelspec": {
201-
"display_name": "Python 3",
210+
"display_name": "Python 2",
202211
"language": "python",
203-
"name": "python3"
212+
"name": "python2"
204213
},
205214
"language_info": {
206215
"codemirror_mode": {
207216
"name": "ipython",
208-
"version": 3
217+
"version": 2
209218
},
210219
"file_extension": ".py",
211220
"mimetype": "text/x-python",
212221
"name": "python",
213222
"nbconvert_exporter": "python",
214-
"pygments_lexer": "ipython3",
215-
"version": "3.4.3"
223+
"pygments_lexer": "ipython2",
224+
"version": "2.7.5+"
216225
}
217226
},
218227
"nbformat": 4,

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)