Adding link to Stanford numpy tutorial and readability improvements.
This commit is contained in:
parent
1fae6cb8a2
commit
7fd23d81cf
@ -53,7 +53,7 @@
|
||||
"\n",
|
||||
"In addition to opening notebook files, we can also edit text files such as `.py` source files, directly in the browser by opening them from the dashboard. The in-built text-editor is less-featured than a full IDE but is useful for quick edits of source files and previewing data files.\n",
|
||||
"\n",
|
||||
"The `Running` tab of the dashboard gives a list of the currently running notebook instances. This can be useful to keep track of which notebooks are still running and to shutdown (or reopen) old notebook processes when the corresponding tab has been closed. In Jupyter parlance, the Python process associated with a notebook is often termed a *kernel* although this is also sometimes used to refer to a slightly different [concept](http://jupyter.readthedocs.io/en/latest/projects/kernels.html).\n",
|
||||
"The `Running` tab of the dashboard gives a list of the currently running notebook instances. This can be useful to keep track of which notebooks are still running and to shutdown (or reopen) old notebook processes when the corresponding tab has been closed.\n",
|
||||
"\n",
|
||||
"### The notebook interface\n",
|
||||
"\n",
|
||||
@ -254,7 +254,9 @@
|
||||
"source": [
|
||||
"# Exercises\n",
|
||||
"\n",
|
||||
"Today's exercises are meant to allow you to get some initial familiarisation with the `mlp` package and how data is provided to the learning functions. Next week onwards, we will follow with the material covered in lectures.\n",
|
||||
"Today's exercises are meant to allow you to get some initial familiarisation with the `mlp` package and how data is provided to the learning functions. Next week onwards, we will follow with the material covered in lectures. \n",
|
||||
"\n",
|
||||
"If you are new to Python and/or NumPy and are struggling to complete the exercises, you may find going through [this Stanford University tutorial](http://cs231n.github.io/python-numpy-tutorial/) first helps. There is also a derived Jupyter notebook which you can download [from here](https://github.com/kuleshov/cs228-material/raw/master/tutorials/python/cs228-python-tutorial.ipynb) - if you save this in to your `mlpractical/notebooks` directory you should be able to open the notebook from the dashboard to run the examples.\n",
|
||||
"\n",
|
||||
"## Data providers\n",
|
||||
"\n",
|
||||
@ -294,7 +296,7 @@
|
||||
" which_set='valid', batch_size=1, max_num_batches=2, shuffle_order=True)\n",
|
||||
"\n",
|
||||
"for inputs, target in mnist_dp:\n",
|
||||
" show_single_image(inputs.reshape(28, 28))\n",
|
||||
" show_single_image(inputs.reshape((28, 28)))\n",
|
||||
" print('Image target: {0}'.format(target))"
|
||||
]
|
||||
},
|
||||
@ -321,7 +323,8 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# write your code here for iterating over five batches of 100 data points each and displaying as 10x10 grids\n",
|
||||
"# write your code here for iterating over five batches of \n",
|
||||
"# 100 data points each and displaying as 10x10 grids\n",
|
||||
"\n",
|
||||
"def show_batch_of_images(img_batch):\n",
|
||||
" raise NotImplementedError('Write me!')"
|
||||
@ -342,7 +345,7 @@
|
||||
"For training of neural networks a 1-of-K representation of multi-class targets is more useful. Instead of representing class identity by an integer ID, for each data point a vector of length equal to the number of classes is created, will all elements zero except for the element corresponding to the class ID. \n",
|
||||
"\n",
|
||||
"For instance, given a batch of 5 integer targets `[2, 2, 0, 1, 0]` and assuming there are 3 different classes \n",
|
||||
"the corresponding 1-of_K encoded targets would be\n",
|
||||
"the corresponding 1-of-K encoded targets would be\n",
|
||||
"```\n",
|
||||
"[[0, 0, 1],\n",
|
||||
" [0, 0, 1],\n",
|
||||
|
Loading…
Reference in New Issue
Block a user