Closed kamenix closed 7 years ago
Hi, I am sorry but I couldn't reproduce your problem. Could it be that there is a problem with your caffe version (the syntax of loading models changed between different caffe versions)? I definitely works for me using the Caffe 0.14 Nvidia binaries. You can get a docker container with my setup by following the instructions here: https://github.com/bethgelab/docker
Best Leon
Hello,
I tried to run the code. I had a problem with this line :
[source_img, net] = load_image(im_dir + source_img_name, im_size, VGGmodel, VGGweights, imagenet_mean, show_img=True). The program dies and here is an extract from the console :
5717 net.cpp:219] conv3_2 does not need backward computation. I0301 15:29:31.425060 5717 net.cpp:219] relu3_1 does not need backward computation. I0301 15:29:31.425073 5717 net.cpp:219] conv3_1 does not need backward computation. I0301 15:29:31.425088 5717 net.cpp:219] pool2 does not need backward computation. I0301 15:29:31.425102 5717 net.cpp:219] relu2_2 does not need backward computation. I0301 15:29:31.425115 5717 net.cpp:219] conv2_2 does not need backward computation. I0301 15:29:31.425130 5717 net.cpp:219] relu2_1 does not need backward computation. I0301 15:29:31.425143 5717 net.cpp:219] conv2_1 does not need backward computation. I0301 15:29:31.425158 5717 net.cpp:219] pool1 does not need backward computation. I0301 15:29:31.425173 5717 net.cpp:219] relu1_2 does not need backward computation. I0301 15:29:31.425186 5717 net.cpp:219] conv1_2 does not need backward computation. I0301 15:29:31.425202 5717 net.cpp:219] relu1_1 does not need backward computation. I0301 15:29:31.425215 5717 net.cpp:219] conv1_1 does not need backward computation. I0301 15:29:31.425230 5717 net.cpp:219] input does not need backward computation. I0301 15:29:31.425252 5717 net.cpp:261] This network produces output pool5 I0301 15:29:31.425343 5717 net.cpp:274] Network initialization done. I0301 15:29:32.167654 5717 upgrade_proto.cpp:51] Attempting to upgrade input file specified using deprecated V1LayerParameter: /home/mkammoun/PycharmProjects/Deep_Texture_2/Models/VGG_normalised.caffemodel I0301 15:29:32.502588 5717 upgrade_proto.cpp:59] Successfully upgraded file specified using deprecated V1LayerParameter I0301 15:29:32.506871 5717 upgrade_proto.cpp:65] Attempting to upgrade input file specified using deprecated input fields: /home/mkammoun/PycharmProjects/Deep_Texture_2/Models/VGG_normalised.caffemodel
Process finished with exit code 139
(I am using Pycharm)
After debugging, it comes to a problem of loading the pretrained network inside the function load_image :
net = caffe.Classifier( net_model, net_weights, mean = net_mean, channel_swap=(2,1,0), input_scale=255,)
There is not much on google, anyone can help ? thanks