albarji / neural-style-docker

A dockerized version of neural style transfer algorithms
MIT License
112 stars 34 forks source link

Torch tried to allocate 0GB #6

Closed ghost closed 6 years ago

ghost commented 7 years ago

Trying to execute the "fake-it.sh" script gives me the following output:

tput: No value for $TERM and no -T specified
[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 /neural-style/models/VGG_ILSVRC_19_layers.caffemodel
/root/torch/install/bin/luajit: $ Torch: not enough memory: you tried to allocate 0GB. Buy new RAM! at /root/torch/pkg/torch/lib/TH/THGeneral.c:226
stack traceback:
    [C]: at 0x7fccd1cbbf00
    [C]: in function 'Tensor'
    /root/torch/install/share/lua/5.1/nn/Linear.lua:6: in function '__init'
    /root/torch/install/share/lua/5.1/torch/init.lua:91: in function </root/torch/install/share/lua/5.1/torch/init.lua:87>
    [C]: in function 'Linear'
    ...al-style/models/VGG_ILSVRC_19_layers_deploy.prototxt.lua:41: in main chunk
    [C]: in function 'dofile'
    /root/torch/install/share/lua/5.1/loadcaffe/loadcaffe.lua:24: in function 'load'
    /neural-style/neural_style.lua:73: in function 'main'
    /neural-style/neural_style.lua:515: in main chunk
    [C]: in function 'dofile'
    /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
    [C]: at 0x00406670

real    0m13.025s
user    0m0.052s
sys 0m0.036s

Given the attempt to allocate 0GB I guess this is simply a incorrect parameter somewhere, but I couldn't any help on Google. What should I do?

albarji commented 7 years ago

Weird! Does your computer have a CUDA capable GPU? Have you installed the nvidia drivers for it?