How to capture the style

A part of the process is quite similar to what we have seen in the content cost function. So, we will still use convolution layers to capture image features and we will feed the neural network with a generated image, and then instead of the content image, we will use the style image here. And once we do that, we have the features captured for each of the layers.

Let's suppose that we pick up this layer as a feature detector, and for the sake of simplicity, let's suppose that layer has only four channels in comparison to many such channels in real convolution architectures, as shown in the following diagram:

The style on the second layer will be defined as the activation correlation between channels. But, what that means is that we will have a look at the activation numbers between channels, their degree of correlation, and in some way, how similar they are when together. And of course, we have many such activations in one channel. For instance, for the first channel we'll have a look at each of the activations on the first channel, how similar they are with the activation numbers on each of those activation numbers on the second channel, and then we will do the same for the first channel activation numbers and third channel activation numbers, their degree of correlation, and with a four channel as well.

Now, we will repeat the same process, but starting from the second channel. So, we will see how correlated the activation numbers are with the first channel activation numbers, and then with a third, and then with the fourth. And that gives us the correlation between the second channel and all other channels on this layer. Although the process may be clearer, still one question remains; why does this represents the style? So why is this correlation the style after all?

Let's suppose that we had the feature-detecting for the layer that is shown in the following image:

For those two activations, let's assume that they detect the vertical line, and the other one the orange (the highlighted square) color. If they are highly correlated, that means that whenever a vertical line is encountered, the orange color is also present. So they always tend to occur together.

On the other hand, if they are not correlated, it would mean that whenever a vertical line is encountered, most probably there will be no orange color around then. In a few words, the correlation enables us to capture the degree, or the level of the feature combinations together. In contrast to the cost function, we are not going to compare the activations directly, but instead, the activation correlations, because those are detecting the style of the role.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.29.22