Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

choose content layer #345

Open
elviswind opened this issue Oct 25, 2016 · 2 comments
Open

choose content layer #345

elviswind opened this issue Oct 25, 2016 · 2 comments

Comments

@elviswind
Copy link

I saw these parameters
cmd:option('-content_layers', 'relu4_2', 'layers for content')
cmd:option('-style_layers', 'relu1_1,relu2_1,relu3_1,relu4_1,relu5_1', 'layers for style')

but how do you know which layer in VGG learned style and which learned the content ?

@htoyryla
Copy link

All layers can work with both content and style.

VGG19 recognizes content features because it has been trained to classify image contents. The lowest layers recognize simple features, such as lines, whereas higher layers see increasingly complex features, such as shapes and objects.

When you select a layer for style, neural-style adds a so-called Gram matrix to this layer to evaluate style.

This might also help to understand how neural-style works http://liipetti.net/erratic/2016/05/19/how-neural-style-works/

@loxy
Copy link

loxy commented Jan 7, 2017

Does anyone knows why the guys used conv1_1, conv2_1, conv3_1, conv4_1, conv5_1 instead of for example conv1_2, conv2_2, conv3_4, conv4_4, conv5_4 ("last" layer of respective area) in the original paper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants