Skip to content

Commit

Permalink
fixed function names and notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
nfmcclure committed Feb 19, 2017
1 parent a667524 commit 1802bf9
Show file tree
Hide file tree
Showing 20 changed files with 541 additions and 191 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"# Operations on a Computational Graph\n",
"\n",
Expand All @@ -13,7 +16,9 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
Expand All @@ -27,7 +32,10 @@
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"### Start a graph session"
]
Expand All @@ -36,7 +44,9 @@
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
Expand All @@ -45,7 +55,10 @@
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"### Create tensors"
]
Expand All @@ -54,7 +67,9 @@
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
Expand All @@ -70,7 +85,10 @@
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"We loop through the input values and print out the multiplication operation for each input."
]
Expand All @@ -79,7 +97,9 @@
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
Expand All @@ -96,14 +116,17 @@
],
"source": [
"# Multiplication\n",
"prod = tf.mul(x_data, m)\n",
"prod = tf.multiply(x_data, m)\n",
"for x_val in x_vals:\n",
" print(sess.run(prod, feed_dict={x_data: x_val}))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"### Output graph to Tensorboard"
]
Expand All @@ -112,7 +135,9 @@
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
Expand All @@ -125,7 +150,10 @@
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"![Operations on a Graph](https://github.com/nfmcclure/tensorflow_cookbook/raw/master/02_TensorFlow_Way/images/01_Operations_on_a_Graph.png)"
]
Expand All @@ -134,7 +162,9 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
m = tf.constant(3.)

# Multiplication
prod = tf.mul(x_data, m)
prod = tf.multiply(x_data, m)
for x_val in x_vals:
print(sess.run(prod, feed_dict={x_data: x_val}))

Expand Down
Loading

0 comments on commit 1802bf9

Please sign in to comment.