Commit 9f70c4ce by Angelo Ziletti

### Update bigmax tutorial

parent faf0ef8b
 ... @@ -11775,7 +11775,7 @@ div#notebook { ... @@ -11775,7 +11775,7 @@ div#notebook {

(Convolutional) Neural network tutorial - BigMax workshop - Dresden, April 2019

Authors: Angelo Ziletti, Andreas Leitherer, and Luca M. Ghiringhelli - Fritz Haber Institute of the Max Planck Society, Berlin

In this tutorial, we briefly introduce the main ideas behind convolutional neural networks, build a neural network model, and finally explain the classification decision process using attentive response maps.

(Convolutional) Neural network tutorial - BigMax workshop - Dresden, April 2019

Authors: Angelo Ziletti, Andreas Leitherer, and Luca M. Ghiringhelli - Fritz Haber Institute of the Max Planck Society, Berlin

In this tutorial, we briefly introduce the main ideas behind convolutional neural networks, build a neural network model with Keras, and explain the classification decision process using attentive response maps.

... @@ -11991,10 +11991,10 @@ Convolutional networks have been tremendously successful in practical applicatio ... @@ -11991,10 +11991,10 @@ Convolutional networks have been tremendously successful in practical applicatio

The name "convolutional neural network" indicates that the network employs a mathematical operation called convolution. Convolution is a specialized kind of linear operation.

The name "convolutional neural network" indicates that the network employs a mathematical operation called convolution. Convolution is a specialized kind of linear operation.

A typical layer of a convolutional network consists of three stages:

A typical layer of a convolutional network consists of three stages:

1. Convolution stage: the layer performs several convolutions in parallel to produce a set of linear activations.

2. Convolution stage: the layer performs several convolutions in parallel to produce a set of linear activations (see Sec. 3 for more details).

3. Detector stage: each linear activation is run through a nonlinear activation function (e.g. rectified linear

4. Detector stage: each linear activation is run through a nonlinear activation function (e.g. rectified linear activation function)

activation function, sigmoid or tanh function)

5. Pooling stage: a pooling function is used to modify (downsample) the output of the layer. A pooling function replaces the output of the network at a certain location with a summary statistic of the nearby outputs. For example, the max pooling operation reports the maximum output within a rectangular neighborhood. Other popular pooling functions include the average of a rectangular neighborhood, the \$L^2\$ norm of a rectangular neighborhood, or a weighted average based on the distance from the central pixel.

6. Pooling stage: a pooling function is used to modify (downsample) the output of the layer. A pooling function replaces the output of the network at a certain location with a summary statistic of the nearby outputs. For example, the max pooling operation reports the maximum output within a rectangular neighborhood. Other popular pooling functions include the average of a rectangular neighborhood, the \$L^2\$ norm of a rectangular neighborhood, or a weighted average based on the distance from the central pixel.

 ... @@ -9,7 +9,7 @@ ... @@ -9,7 +9,7 @@ "\n", "\n", "##### Authors: Angelo Ziletti, Andreas Leitherer, and Luca M. Ghiringhelli - Fritz Haber Institute of the Max Planck Society, Berlin\n", "##### Authors: Angelo Ziletti, Andreas Leitherer, and Luca M. Ghiringhelli - Fritz Haber Institute of the Max Planck Society, Berlin\n", "\n", "\n", "In this tutorial, we briefly introduce the main ideas behind convolutional neural networks, build a neural network model, and finally explain the classification decision process using attentive response maps." "In this tutorial, we briefly introduce the main ideas behind convolutional neural networks, build a neural network model with Keras, and explain the classification decision process using attentive response maps." ] ] }, }, { { ... @@ -203,10 +203,10 @@ ... @@ -203,10 +203,10 @@ "\n", "\n", "\n", "\n", "A typical layer of a convolutional network consists of three stages:\n", "A typical layer of a convolutional network consists of three stages:\n", "1. **Convolution** stage: the layer performs several convolutions in parallel to produce a set of linear activations. \n", "1. **Convolution** stage: the layer performs several convolutions in parallel to produce a set of linear activations (see Sec. 3 for more details).\n", "\n", "\n", "2. **Detector** stage: each linear activation is run through a nonlinear activation function (e.g. rectified linear \n", "2. **Detector** stage: each linear activation is run through a nonlinear activation function (e.g. rectified linear \n", "activation function)\n", "activation function, sigmoid or tanh function)\n", "\n", "\n", "3. **Pooling** stage: a pooling function is used to modify (downsample) the output of the layer. A pooling function replaces the output of the network at a certain location with a summary statistic of the nearby outputs. For example, the max pooling operation reports the maximum output within a rectangular neighborhood. Other popular pooling functions include the average of a rectangular neighborhood, the \$L^2\$ norm of a rectangular neighborhood, or a weighted average based on the distance from the central pixel.\n", "3. **Pooling** stage: a pooling function is used to modify (downsample) the output of the layer. A pooling function replaces the output of the network at a certain location with a summary statistic of the nearby outputs. For example, the max pooling operation reports the maximum output within a rectangular neighborhood. Other popular pooling functions include the average of a rectangular neighborhood, the \$L^2\$ norm of a rectangular neighborhood, or a weighted average based on the distance from the central pixel.\n", "\n", "\n", ... @@ -357,7 +357,9 @@ ... @@ -357,7 +357,9 @@ { { "cell_type": "code", "cell_type": "code", "execution_count": 3, "execution_count": 3, "metadata": {}, "metadata": { "collapsed": true }, "outputs": [], "outputs": [], "source": [ "source": [ "# this can be skipped because the images are already saved on the server\n", "# this can be skipped because the images are already saved on the server\n", ... @@ -386,7 +388,8 @@ ... @@ -386,7 +388,8 @@ "metadata": { "metadata": { "code_folding": [ "code_folding": [ 7 7 ] ], "collapsed": true }, }, "outputs": [], "outputs": [], "source": [ "source": [ ... @@ -428,7 +431,9 @@ ... @@ -428,7 +431,9 @@ { { "cell_type": "code", "cell_type": "code", "execution_count": 5, "execution_count": 5, "metadata": {}, "metadata": { "collapsed": true }, "outputs": [], "outputs": [], "source": [ "source": [ "# read jpg files as numpy arrays\n", "# read jpg files as numpy arrays\n", ... @@ -511,7 +516,9 @@ ... @@ -511,7 +516,9 @@ { { "cell_type": "code", "cell_type": "code", "execution_count": 6, "execution_count": 6, "metadata": {}, "metadata": { "collapsed": true }, "outputs": [], "outputs": [], "source": [ "source": [ "k_identity = np.array([[0., 0., 0.], \n", "k_identity = np.array([[0., 0., 0.], \n", ... @@ -558,7 +565,9 @@ ... @@ -558,7 +565,9 @@ { { "cell_type": "code", "cell_type": "code", "execution_count": 7, "execution_count": 7, "metadata": {}, "metadata": { "collapsed": true }, "outputs": [], "outputs": [], "source": [ "source": [ "kernels = [k_identity, k_box_blur, k_vlines, k_hlines, k_edges, k_emboss]\n", "kernels = [k_identity, k_box_blur, k_vlines, k_hlines, k_edges, k_emboss]\n", ... @@ -1223,7 +1232,9 @@ ... @@ -1223,7 +1232,9 @@ { { "cell_type": "code", "cell_type": "code", "execution_count": 20, "execution_count": 20, "metadata": {}, "metadata": { "collapsed": true }, "outputs": [], "outputs": [], "source": [ "source": [ "from vis.visualization import visualize_saliency\n", "from vis.visualization import visualize_saliency\n", ... @@ -1437,16 +1448,18 @@ ... @@ -1437,16 +1448,18 @@ { { "cell_type": "code", "cell_type": "code", "execution_count": null, "execution_count": null, "metadata": {}, "metadata": { "collapsed": true }, "outputs": [], "outputs": [], "source": [] "source": [] } } ], ], "metadata": { "metadata": { "kernelspec": { "kernelspec": { "display_name": "Python 3", "display_name": "Python [conda env:py37]", "language": "python", "language": "python", "name": "python3" "name": "conda-env-py37-py" }, }, "language_info": { "language_info": { "codemirror_mode": { "codemirror_mode": {
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!