Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
40b84bce
Commit
40b84bce
authored
Jul 16, 2018
by
Mark Daoust
Browse files
autograph.utils.set_element_type --> autograph.set_element_type
parent
3ec66da0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
samples/core/guide/autograph.ipynb
samples/core/guide/autograph.ipynb
+18
-5
No files found.
samples/core/guide/autograph.ipynb
View file @
40b84bce
...
...
@@ -488,7 +488,7 @@
"def f(n):\n",
" z = []\n",
" # We ask you to tell us the element dtype of the list\n",
" autograph.
utils.
set_element_type(z, tf.int32)\n",
" autograph.set_element_type(z, tf.int32)\n",
" \n",
" for i in range(n):\n",
" z.append(i)\n",
...
...
@@ -746,13 +746,13 @@
" # to convert these lists into their graph equivalent,\n",
" # we need to specify the element type of the lists.\n",
" train_losses = []\n",
" autograph.
utils.
set_element_type(train_losses, tf.float32)\n",
" autograph.set_element_type(train_losses, tf.float32)\n",
" test_losses = []\n",
" autograph.
utils.
set_element_type(test_losses, tf.float32)\n",
" autograph.set_element_type(test_losses, tf.float32)\n",
" train_accuracies = []\n",
" autograph.
utils.
set_element_type(train_accuracies, tf.float32)\n",
" autograph.set_element_type(train_accuracies, tf.float32)\n",
" test_accuracies = []\n",
" autograph.
utils.
set_element_type(test_accuracies, tf.float32)\n",
" autograph.set_element_type(test_accuracies, tf.float32)\n",
" \n",
" # This entire training loop will be run in-graph.\n",
" i = tf.constant(0)\n",
...
...
@@ -835,6 +835,19 @@
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "qj0pLwit746K",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
""
],
"execution_count": 0,
"outputs": []
}
]
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment