leongatys / DeepTextures

Code to synthesise textures using convolutional neural networks as described in Gatys et al. 2015 (http://arxiv.org/abs/1505.07376)
273 stars 82 forks source link

Train/Solver #2

Closed noshaba closed 8 years ago

noshaba commented 8 years ago

Hi, is it possible to get the train_val.prototxt and the solver.prototxt files for the normalized network as well?

leongatys commented 8 years ago

Hi, I think there is a slight misunderstanding. The normalised network is not trained in any way and it performs exactly the same computation as the original VGG network. The only difference is that the input and output weights of each unit are scaled to control the average activation of that unit. If you scale down all input weights to a unit by a factor k and you scale up all output weights of that unit by the same factor k, then the activation of that unit will be scaled down by a factor k but the input that unit provides to the next layer is exactly the same. You can do this if all the non-linearities in your network are rectifying linear (like VGG). If you have some non-linear interactions like LRN in AlexNet you cannot do this. We did this just for practicality to have the activations in different layers on the same scale and it eases hyperparameter tuning.

So in short: there is no train_val or solver.prototxt file for the normalised network, because there is no training involved in the normalisation procedure.

noshaba commented 8 years ago

Ok, it's just, to create a .caffemodel file you usually need a train_val.prototxt file or is there another way to create one? ^^'

leongatys commented 8 years ago

You can load the original VGG network eg. in the python interface, rescale the parameter values of the network object and save the network object as a .caffemodel file.

noshaba commented 8 years ago

Oh, alright ^^ Thank you