manuelruder / artistic-videos

Torch implementation for the paper "Artistic style transfer for videos"
Other
1.75k stars 252 forks source link

"size mismatch," on example and some images in CPU only mode #12

Open jd730 opened 8 years ago

jd730 commented 8 years ago

When I tested some image, I got this error

 [libprotobuf WARNING google/protobuf/io/coded_stream.cc:505] Reading dangerously large protocol message.  If the message turns out to be larger than 1073741824 bytes, parsing will be halted for security reasons.  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
[libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192
Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel
conv1_1: 64 3 3 3
conv1_2: 64 64 3 3
conv2_1: 128 64 3 3
conv2_2: 128 128 3 3
conv3_1: 256 128 3 3
conv3_2: 256 256 3 3
conv3_3: 256 256 3 3
conv3_4: 256 256 3 3
conv4_1: 512 256 3 3
conv4_2: 512 512 3 3
conv4_3: 512 512 3 3
conv4_4: 512 512 3 3
conv5_1: 512 512 3 3
conv5_2: 512 512 3 3
conv5_3: 512 512 3 3
conv5_4: 512 512 3 3
fc6: 1 1 25088 4096
fc7: 1 1 4096 4096
fc8: 1 1 4096 1000
Style image size: 450 x 350 
Setting up temporal consistency.    
Setting up temporal layer   1   :   nil 
Setting up temporal layer   2   :   nil 
Setting up temporal layer   3   :   nil 
Setting up temporal layer   4   :   nil 
Setting up temporal layer   5   :   nil 
Setting up temporal layer   6   :   nil 
Setting up temporal layer   7   :   nil 
Setting up temporal layer   8   :   nil 
Setting up temporal layer   9   :   nil 
Setting up temporal layer   10  :   nil 
Setting up temporal layer   11  :   nil 
Setting up temporal layer   12  :   nil 
Setting up temporal layer   13  :   nil 
Setting up temporal layer   14  :   nil 
Setting up temporal layer   15  :   nil 
Setting up temporal layer   16  :   nil 
Setting up temporal layer   17  :   nil 
Setting up temporal layer   18  :   nil 
Setting up temporal layer   19  :   nil 
Setting up temporal layer   20  :   nil 
Setting up temporal layer   21  :   nil 
Setting up temporal layer   22  :   nil 
Setting up temporal layer   23  :   nil 
Setting up temporal layer   24  :   nil 
Setting up temporal layer   25  :   nil 
Setting up temporal layer   26  :   nil 
Setting up temporal layer   27  :   nil 
Setting up temporal layer   28  :   nil 
Setting up temporal layer   29  :   nil 
Setting up temporal layer   30  :   nil 
Setting up temporal layer   31  :   nil 
Setting up temporal layer   32  :   nil 
Setting up temporal layer   33  :   nil 
Setting up temporal layer   34  :   nil 
Setting up temporal layer   35  :   nil 
Setting up temporal layer   36  :   nil 
Setting up temporal layer   37  :   nil 
Setting up temporal layer   38  :   nil 
Setting up temporal layer   39  :   nil 
Setting up temporal layer   40  :   nil 
Setting up temporal layer   41  :   nil 
Setting up temporal layer   42  :   nil 
Setting up temporal layer   43  :   nil 
Setting up temporal layer   44  :   nil 
Setting up temporal layer   45  :   nil 
Setting up temporal layer   46  :   nil 
/usr/local/bin/luajit: /usr/local/share/lua/5.1/nn/Linear.lua:39: size mismatch, [4096 x 25088], [84480] at /tmp/luarocks_torch-scm-1-9520/torch7/lib/TH/generic/THTensorMath.c:707
stack traceback:
    [C]: in function 'addmv'
    /usr/local/share/lua/5.1/nn/Linear.lua:39: in function 'updateOutput'
    /usr/local/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
    ./artistic_video_core.lua:17: in function 'runOptimization'
    artistic_video.lua:259: in function 'main'
    artistic_video.lua:355: in main chunk
    [C]: in function 'dofile'
    /usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
    [C]: at 0x00406260

I thought some of commend's arguments were wrong, so I did no argument(initial setting for example). Same error occurred. I found same error in neural style(https://github.com/jcjohnson/neural-style/issues/19), but it's error came from using 'content_layers' instead of 'content_image'.

Here is my first and second attempt's commend. first, th artistic_video.lua -style_image style.jpg -content_pattern image/illusion%03d.jpg -num_images 40 -start_number 0 -output_folder output/ -number_format %03d -gpu -1 second, th artistic_video.lua -gpu -1

cf) I also tried artistic_video_multiPass.lua, and nothing's really changed.

manuelruder commented 8 years ago

I can't reproduce this issue. th artistic_video.lua -gpu -1 works fine for me. Do you use the most recent torch / nn version?

jd730 commented 8 years ago

I think that these in my computer are enough version. Because,JCJohnson's Neural-Style and Google's Deep Dream was running correctly. I use torch 7. Now I updated nn using 'luarocks install nn' command. however same error occured.

WARNING: If you see a stack trace below, it doesn't point to the place where this error occured. Please use only the one above.
stack traceback:
    [C]: in function 'error'
    /usr/local/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors'
    /usr/local/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
    ./artistic_video_core.lua:17: in function 'runOptimization'
    artistic_video.lua:259: in function 'main'
    artistic_video.lua:355: in main chunk
    [C]: in function 'dofile'
    /usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
    [C]: at 0x00406260

This message appear under the error.

cf) Version of lua is 5.2.3 ( it may not affect these error)

I will check other programs which artistic-vedeos need to such as CUDA, and Caffe Thank you so much. If the program would still wrong, although after checking and upgrading program I will ask you.