Skip to content

Commit 1b1d711

Browse files
write some ActMax text
1 parent f41a889 commit 1b1d711

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ The depth of Layer 1 is 64. You can see how each filter extracts different detai
8989
</tr>
9090
</tbody>
9191
</table>
92+
9293
<table border=0 width="800px" align="center">
9394
<tbody>
9495
<tr>
@@ -103,6 +104,7 @@ The depth of Layer 1 is 64. You can see how each filter extracts different detai
103104
</tr>
104105
</tbody>
105106
</table>
107+
106108
<table border=0 width="800px" align="center">
107109
<tbody>
108110
<tr>
@@ -121,18 +123,22 @@ The depth of Layer 1 is 64. You can see how each filter extracts different detai
121123
<a id='max_activations'></a>
122124
## Activation Maximization
123125

124-
Bla bla bla. Write some stuff here.
126+
Activation Maximization was first proposed by Erhan et al.<sup>[[3]](#3)</sup> in 2009 as a way to communicate CNN behavior. Specifically as a way to intepret or visualize learned feature maps. This learned feature map can be represented by an active state of particular neurons. By looking at the maximimum activation of particular neurons we can visualize what patters are larned in particular filters.
127+
128+
### The Algorithm
129+
130+
We start with a pretrained Vgg16 model and a noisy image as seen below. This image is passed through the network. At a particular layer the gradient with respect to the noisy image is calculated at each neuron.<sup>[[4]](#4)</sup> This is calculted using backpropagation, while keeping the parameters of the model fixed. The `hook_fn` in the `ActivationMaximizationVis()` class captures the calculated gradients. Each pixel in the original noisy image is then iteratively changed to maximize the activation of the neuron. In otherwords, each pixel in the noisy image is iteratively changed to push the gradient to a maximum for that particular value. The pixel values are updated until a desired image is found.
125131

126132
<p align="center">
127133
<img width="250" src = "filter_imgs/01_noisy_image.jpg">
128134
</p>
129135

130-
### The Algorithm
136+
### Layer Vis
131137

132-
Write some stuff here.
138+
We can visualize the activation map of each layer after a noisy image is passed through the network. Using the activation maximization technique we can see that patterns emerge at each layer/filter combination. If you look at the earlier layers in the network you can see that simplier patterns emerge. We start to notice that the activation map pulls out simpler patters and colors. Vertical and horizontal elements can be seen.
139+
140+
As we move deeper in the network you can see that more complex patters emerge. Some of the activation maps of later layers look like trees, eyes, and feathers. Well, at least that's what it looks like to me. We all may see something different.
133141

134-
### Layer Vis
135-
Taking a look at the first few layers you can see...
136142
<table border=0 width="800px" align="center">
137143
<tbody>
138144
<tr>
@@ -150,6 +156,7 @@ Taking a look at the first few layers you can see...
150156
</tbody>
151157
</table>
152158
Now if we take a look more layers you can see...
159+
153160
<table border=0 width="800px" align="center">
154161
<tbody>
155162
<tr>

0 commit comments

Comments
 (0)