7
$\begingroup$

We're doing a re-implementation of the style transfer algorithm in Gatys et al. Image Style Transfer Using Convolutional Neural Networks. There are many example implementations out there but except for the authors almost everyone goes with the standard network with pretrained weights. In section 2 - Deep Image Representations there is the following passage:

We normalized the network by scaling the weights such that the mean activation of each convolutional filter over images and positions is equal to one. Such re-scaling can be done for the VGG network without changing its output, because it contains only rectifying linear activation functions and no normalization or pooling over feature maps.

I'm wondering what that means in practice - is that capturing the activation maps for all images in imagenet (training set) and then adjust the relu weights based on those sums across all images, all positions for each filter element? Not sure how to interpret this if it's not related to training data at all.

$\endgroup$
3
  • $\begingroup$ Why was this perfectly legitimate question downvoted?! +1. $\endgroup$
    – amoeba
    Apr 26, 2017 at 9:53
  • $\begingroup$ For anyone who uses a different framework than caffe, here is an onnx model which you can convert to most other frameworks. P.S I used the weights (which I used to create the above file) from Korhan's answer and the activation maps average out to around 0.026 $\endgroup$
    – DarQ
    Jun 4, 2020 at 23:17
  • $\begingroup$ I have implemented the code for weight normalization in tf.keras. The normalized VGG16 weights have been uploaded in a GitHub release too. The link for the GitHub repository. Note Beside: The normalized weights $\endgroup$ Sep 11, 2020 at 13:19

1 Answer 1

3
$\begingroup$

"-is that capturing the activation maps for all images in imagenet (training set) and then adjust the relu weights based on those sums across all images, all positions for each filter element?"

I suppose your guess is correct. I've came across the normalised network that they used and inspected its activation matrices for several images. Their mean tends to be below 1. The normalised model is made publicly available by the authors: http://bethgelab.org/media/uploads/deeptextures/vgg_normalised.caffemodel

I hope this link helps.

$\endgroup$
2
  • $\begingroup$ Thank you. I connected with the author and he had captured the activation values across the iLSVRC validation set, and we could confirm the scaling factors against this information. $\endgroup$ May 31, 2017 at 9:48
  • $\begingroup$ This seems like a mirror of the same file? (Since original is down) github.com/paulu/deepfeatinterp/blob/master/models/VGG_CNN_19/… $\endgroup$
    – endolith
    Sep 30, 2020 at 22:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.