log0 / neural-style-painting

Implementing of the "A Neural Algorithm of Artistic Style"
236 stars 100 forks source link

Different indexes for W, b and layer_name #2

Open EibrielInv opened 8 years ago

EibrielInv commented 8 years ago

Hi! For some reason for me the indexes on the layers are different on https://github.com/log0/neural-style-painting/blob/master/art.py#L144

from

        W = vgg_layers[0][layer][0][0][0][0][0]
        b = vgg_layers[0][layer][0][0][0][0][1]
        layer_name = vgg_layers[0][layer][0][0][-2]

to

        W = vgg_layers[0][layer][0][0][2][0][0]
        b = vgg_layers[0][layer][0][0][2][0][1]
        layer_name = vgg_layers[0][layer][0][0][0][0]

I've donwloaded the model from the link provided: http://www.vlfeat.org/matconvnet/models/imagenet-vgg-verydeep-19.mat

EibrielInv commented 8 years ago

Related to Pull request https://github.com/log0/neural-style-painting/pull/1

ivan-v-kush commented 7 years ago

was the same problem. His code is based on https://github.com/ckmarkoh/neuralart_tensorflow that uses the different imagenet-vgg-verydeep-19.mat (see Requirenments sec) than the link provided by this repository: http://www.vlfeat.org/matconvnet/models/imagenet-vgg-verydeep-19.mat

All is OK, when have downloaded the file from ckmarkoh

liangyihuai commented 6 years ago

@IvanKush Your comment helps me out.