Adding answer to exercise in lab 8 notebook.
This commit is contained in:
parent
2b929b7acf
commit
1e4a198711
@ -346,7 +346,14 @@
|
||||
" across all batches in dataset and second value corresponding to\n",
|
||||
" average classification accuracy across all batches in dataset.\n",
|
||||
" \"\"\"\n",
|
||||
" raise NotImplementedError()"
|
||||
" err = 0\n",
|
||||
" acc = 0\n",
|
||||
" for input_batch, target_batch in data:\n",
|
||||
" err += sess.run(error, feed_dict={inputs: input_batch, targets: target_batch})\n",
|
||||
" acc += sess.run(accuracy, feed_dict={inputs: input_batch, targets: target_batch})\n",
|
||||
" err /= data.num_batches\n",
|
||||
" acc /= data.num_batches\n",
|
||||
" return err, acc"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -457,7 +464,9 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"As hinted earlier TensorFlow comes with tools for visualising computation graphs. In particular [TensorBoard](https://www.tensorflow.org/how_tos/summaries_and_tensorboard/) is an interactive web application for amongst other things visualising TensorFlow computation graphs (we will explore some of its other functionality in the latter part of the exercise). Typically TensorBoard in launched from a terminal and a browser used to connect to the resulting locally running TensorBoard server instance. However for the purposes of graph visualisation it is also possible to embed a remotely-served TensorBoard graph visualisation interface in a Jupyter notebook using the helper function below (a slight variant of the recipe in [this notebook](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/deepdream/deepdream.ipynb))."
|
||||
"As hinted earlier TensorFlow comes with tools for visualising computation graphs. In particular [TensorBoard](https://www.tensorflow.org/how_tos/summaries_and_tensorboard/) is an interactive web application for amongst other things visualising TensorFlow computation graphs (we will explore some of its other functionality in the latter part of the exercise). Typically TensorBoard in launched from a terminal and a browser used to connect to the resulting locally running TensorBoard server instance. However for the purposes of graph visualisation it is also possible to embed a remotely-served TensorBoard graph visualisation interface in a Jupyter notebook using the helper function below (a slight variant of the recipe in [this notebook](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/deepdream/deepdream.ipynb)).\n",
|
||||
"\n",
|
||||
"<span style='color: red; font-weight: bold;'>Note: The code below seems to not work for some people when accessing the notebook in Firefox. You can either try loading the notebook in an alternative browser, or just skip this section for now and explore the graph visualisation tool when launching TensorBoard below.</span>"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user