neural-style
neural-style copied to clipboard
Problem with libjpeg
After installing the dependencies I run
th neural_style.lua -gpu -1 -print_iter 1
and get the following 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
/home/seb/torch/install/share/lua/5.1/trepl/init.lua:384: /home/seb/torch/install/share/lua/5.1/luarocks/loader.lua:117: error loading module 'libjpeg' from file '/home/seb/torch/install/lib/lua/5.1/libjpeg.so':
/home/seb/torch/install/lib/lua/5.1/libjpeg.so: undefined symbol: jpeg_mem_dest
warning: <libjpeg> could not be loaded (is it installed?)
/home/seb/torch/install/bin/luajit: /home/seb/torch/install/share/lua/5.1/dok/inline.lua:738: <image.loadJPG> libjpeg package not found, please install libjpeg
stack traceback:
[C]: in function 'error'
/home/seb/torch/install/share/lua/5.1/dok/inline.lua:738: in function 'error'
/home/seb/torch/install/share/lua/5.1/image/init.lua:216: in function 'loader'
/home/seb/torch/install/share/lua/5.1/image/init.lua:367: in function 'load'
neural_style.lua:82: in function 'main'
neural_style.lua:500: in main chunk
[C]: in function 'dofile'
.../seb/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
However if I run dpkg -l | grep libjpeg
it returns
`ii libjpeg-dev:amd64 8c-2ubuntu8 amd64 Independent JPEG Group's JPEG runtime library (dependency package)
ii libjpeg-progs 8c-2ubuntu8 amd64 Programs for manipulating JPEG files (dependency package)
ii libjpeg-turbo-progs 1.3.0-0ubuntu2 amd64 Programs for manipulating JPEG files
ii libjpeg-turbo8:amd64 1.3.0-0ubuntu2 amd64 IJG JPEG compliant runtime library.
ii libjpeg-turbo8:i386 1.3.0-0ubuntu2 i386 IJG JPEG compliant runtime library.
ii libjpeg-turbo8-dev:amd64 1.3.0-0ubuntu2 amd64 Development files for the IJG JPEG library
ii libjpeg62:amd64 6b1-4ubuntu1 amd64 Independent JPEG Group's JPEG runtime library (version 6.2)
ii libjpeg8:amd64 8c-2ubuntu8 amd64 Independent JPEG Group's JPEG runtime library (dependency package)
ii libjpeg8:i386 8c-2ubuntu8 i386 Independent JPEG Group's JPEG runtime library (dependency package)
ii libjpeg8-dev:amd64 8c-2ubuntu8 amd64 Independent JPEG Group's JPEG runtime library (dependency package)
What could be the problem?
hey!
it sounds like you may be having a problem I had before. I filed it on the torch repo and got some really good help. maybe this thread will help you https://github.com/torch/image/issues/152
adam
This has been fixed in the meanwhile (see torch/image#155). You should re-install the image package.
try:
brew install jpeg
it worked for me