Merge pull request #23 from AnishShah/master

Change tf.types.int16 to tf.int16
This commit is contained in:
Donne Martin 2016-01-04 18:52:12 -05:00
commit bd71848b65
4 changed files with 44 additions and 35 deletions

View File

@ -15,7 +15,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": 1,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
@ -26,7 +26,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": 2,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
@ -41,7 +41,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": 3,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -68,7 +68,7 @@
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": 5,
"metadata": { "metadata": {
"collapsed": true "collapsed": false
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
@ -76,8 +76,8 @@
"# The value returned by the constructor represents the output\n", "# The value returned by the constructor represents the output\n",
"# of the Variable op. (define as input when running session)\n", "# of the Variable op. (define as input when running session)\n",
"# tf Graph input\n", "# tf Graph input\n",
"a = tf.placeholder(tf.types.int16)\n", "a = tf.placeholder(tf.int16)\n",
"b = tf.placeholder(tf.types.int16)" "b = tf.placeholder(tf.int16)"
] ]
}, },
{ {
@ -194,25 +194,34 @@
" result = sess.run(product)\n", " result = sess.run(product)\n",
" print result" " print result"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 2",
"language": "python", "language": "python",
"name": "python3" "name": "python2"
}, },
"language_info": { "language_info": {
"codemirror_mode": { "codemirror_mode": {
"name": "ipython", "name": "ipython",
"version": 3 "version": 2
}, },
"file_extension": ".py", "file_extension": ".py",
"mimetype": "text/x-python", "mimetype": "text/x-python",
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython2",
"version": "3.4.3" "version": "2.7.5+"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -86,9 +86,9 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# tf Graph input\n", "# tf Graph input\n",
"x = tf.placeholder(tf.types.float32, [None, n_input])\n", "x = tf.placeholder(tf.float32, [None, n_input])\n",
"y = tf.placeholder(tf.types.float32, [None, n_classes])\n", "y = tf.placeholder(tf.float32, [None, n_classes])\n",
"keep_prob = tf.placeholder(tf.types.float32) # dropout (keep probability)" "keep_prob = tf.placeholder(tf.float32) # dropout (keep probability)"
] ]
}, },
{ {
@ -218,7 +218,7 @@
"source": [ "source": [
"# Evaluate model\n", "# Evaluate model\n",
"correct_pred = tf.equal(tf.argmax(pred,1), tf.argmax(y,1))\n", "correct_pred = tf.equal(tf.argmax(pred,1), tf.argmax(y,1))\n",
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.types.float32))" "accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))"
] ]
}, },
{ {
@ -323,21 +323,21 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 2",
"language": "python", "language": "python",
"name": "python3" "name": "python2"
}, },
"language_info": { "language_info": {
"codemirror_mode": { "codemirror_mode": {
"name": "ipython", "name": "ipython",
"version": 3 "version": 2
}, },
"file_extension": ".py", "file_extension": ".py",
"mimetype": "text/x-python", "mimetype": "text/x-python",
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython2",
"version": "3.4.3" "version": "2.7.5+"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -86,9 +86,9 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# tf Graph input\n", "# tf Graph input\n",
"x = tf.placeholder(tf.types.float32, [None, n_input])\n", "x = tf.placeholder(tf.float32, [None, n_input])\n",
"y = tf.placeholder(tf.types.float32, [None, n_classes])\n", "y = tf.placeholder(tf.float32, [None, n_classes])\n",
"keep_prob = tf.placeholder(tf.types.float32) #dropout (keep probability)" "keep_prob = tf.placeholder(tf.float32) #dropout (keep probability)"
] ]
}, },
{ {
@ -201,7 +201,7 @@
"source": [ "source": [
"# Evaluate model\n", "# Evaluate model\n",
"correct_pred = tf.equal(tf.argmax(pred,1), tf.argmax(y,1))\n", "correct_pred = tf.equal(tf.argmax(pred,1), tf.argmax(y,1))\n",
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.types.float32))" "accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))"
] ]
}, },
{ {
@ -299,21 +299,21 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 2",
"language": "python", "language": "python",
"name": "python3" "name": "python2"
}, },
"language_info": { "language_info": {
"codemirror_mode": { "codemirror_mode": {
"name": "ipython", "name": "ipython",
"version": 3 "version": 2
}, },
"file_extension": ".py", "file_extension": ".py",
"mimetype": "text/x-python", "mimetype": "text/x-python",
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython2",
"version": "3.4.3" "version": "2.7.5+"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -137,7 +137,7 @@
"\n", "\n",
"# Evaluate model\n", "# Evaluate model\n",
"correct_pred = tf.equal(tf.argmax(pred,1), tf.argmax(y,1))\n", "correct_pred = tf.equal(tf.argmax(pred,1), tf.argmax(y,1))\n",
"accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.types.float32))" "accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))"
] ]
}, },
{ {
@ -272,21 +272,21 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 2",
"language": "python", "language": "python",
"name": "python3" "name": "python2"
}, },
"language_info": { "language_info": {
"codemirror_mode": { "codemirror_mode": {
"name": "ipython", "name": "ipython",
"version": 3 "version": 2
}, },
"file_extension": ".py", "file_extension": ".py",
"mimetype": "text/x-python", "mimetype": "text/x-python",
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython2",
"version": "3.4.3" "version": "2.7.5+"
} }
}, },
"nbformat": 4, "nbformat": 4,