| Total Complexity | 0 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | """This module contains the high-level architecture design of our 'style model'. |
||
| 2 | |||
| 3 | As 'style model' we define a neural network (represented as a mathematical |
||
| 4 | graph) with several convolutional layers with weights extacted from a pretrained |
||
| 5 | image model (ie the vgg19 model trained for the task of image classification on |
||
| 6 | the imagenet dataset) and some average pooling layers with predefined weights. |
||
| 7 | |||
| 8 | All weigths of the style model stay constants during optimization of the |
||
| 9 | training objective (aka cost function). |
||
| 10 | |||
| 11 | Here we only take the convolution layer weights and define several new |
||
| 12 | AveragePooling. We opt for AveragePooling compared to MaxPooling, since it has |
||
| 13 | been shown to yield better results. |
||
| 14 | """ |
||
| 15 | |||
| 16 | LAYERS = ( |
||
| 17 | 'conv1_1' , |
||
| 18 | 'conv1_2' , |
||
| 19 | 'avgpool1', |
||
| 20 | 'conv2_1' , |
||
| 21 | 'conv2_2' , |
||
| 22 | 'avgpool2', |
||
| 23 | 'conv3_1' , |
||
| 24 | 'conv3_2' , |
||
| 25 | 'conv3_3' , |
||
| 26 | 'conv3_4' , |
||
| 27 | 'avgpool3', |
||
| 28 | 'conv4_1' , |
||
| 29 | 'conv4_2' , |
||
| 30 | 'conv4_3' , |
||
| 31 | 'conv4_4' , |
||
| 32 | 'avgpool4', |
||
| 33 | 'conv5_1' , |
||
| 34 | 'conv5_2' , |
||
| 35 | 'conv5_3' , |
||
| 36 | 'conv5_4' , |
||
| 37 | 'avgpool5', |
||
| 38 | ) |
||
| 39 |