Error with Ex. 5 Image Captioning
See original GitHub issue@anguyen8 I’m trying to run the fifth example, but I encounter the following error:
root@8c4e9b11f13b:~/ppgn# ./5_caption_conditional_sampling.sh a_church_steeple_that_has_a_clock_on_it
libdc1394 error: Failed to initialize libdc1394
-------------
sentence: a_church_steeple_that_has_a_clock_on_it
n_iters: 200
reset_every: 0
save_every: 0
threshold: 0.0
epsilon1: 0.001
epsilon2: 1.0
epsilon3: 1e-17
start learning rate: 1.0
end learning rate: 1e-10
seed: 0
opt_layer: fc6
act_layer: fc8
init_file: None
-------------
output dir: output/fc8_eps1_1e-3_eps3_1e-17/a_church_steeple_that_has_a_clock_on_it
net weights: nets/lrcn/lrcn_caffenet_iter_110000.caffemodel
net definition: nets/caffenet/caffenet.prototxt
captioner definition: nets/lrcn/lrcn_word_to_preds.deploy.prototxt
-------------
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0123 16:11:34.156642 3730 embed_layer.cu:61] Check failed: !propagate_down[0] Can't backpropagate to EmbedLayer input.
*** Check failure stack trace: ***
./5_caption_conditional_sampling.sh: line 52: 3730 Aborted (core dumped) python ./sampling_caption.py --act_layer ${act_layer} --opt_layer ${opt_layer} --sentence ${sentence} --xy ${xy} --n_iters ${n_iters} --save_every ${save_every} --reset_every ${reset_every} --lr ${lr} --lr_end ${lr_end} --seed ${seed} --output_dir ${output_dir} --init_file ${init_file} --epsilon1 ${epsilon1} --epsilon2 ${epsilon2} --epsilon3 ${epsilon3} --threshold ${threshold} --net_weights ${net_weights} --net_definition ${net_definition} --captioner_definition ${captioner_definition}
libdc1394 error: Failed to initialize libdc1394
Which is followed by:
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0123 16:11:38.973918 3734 embed_layer.cu:61] Check failed: !propagate_down[0] Can't backpropagate to EmbedLayer input.
*** Check failure stack trace: ***
./5_caption_conditional_sampling.sh: line 52: 3734 Aborted (core dumped) python ./sampling_caption.py --act_layer ${act_layer} --opt_layer ${opt_layer} --sentence ${sentence} --xy ${xy} --n_iters ${n_iters} --save_every ${save_every} --reset_every ${reset_every} --lr ${lr} --lr_end ${lr_end} --seed ${seed} --output_dir ${output_dir} --init_file ${init_file} --epsilon1 ${epsilon1} --epsilon2 ${epsilon2} --epsilon3 ${epsilon3} --threshold ${threshold} --net_weights ${net_weights} --net_definition ${net_definition} --captioner_definition ${captioner_definition}
libdc1394 error: Failed to initialize libdc1394
And then:
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0123 16:11:43.888489 3738 embed_layer.cu:61] Check failed: !propagate_down[0] Can't backpropagate to EmbedLayer input.
*** Check failure stack trace: ***
./5_caption_conditional_sampling.sh: line 52: 3738 Aborted (core dumped) python ./sampling_caption.py --act_layer ${act_layer} --opt_layer ${opt_layer} --sentence ${sentence} --xy ${xy} --n_iters ${n_iters} --save_every ${save_every} --reset_every ${reset_every} --lr ${lr} --lr_end ${lr_end} --seed ${seed} --output_dir ${output_dir} --init_file ${init_file} --epsilon1 ${epsilon1} --epsilon2 ${epsilon2} --epsilon3 ${epsilon3} --threshold ${threshold} --net_weights ${net_weights} --net_definition ${net_definition} --captioner_definition ${captioner_definition}
montage.im6: unable to open image `output/fc8_eps1_1e-3_eps3_1e-17/a_church_steeple_that_has_a_clock_on_it/fc8_*.jpg': No such file or directory @ error/blob.c/OpenBlob/2641.
montage.im6: missing an image filename `output/fc8_eps1_1e-3_eps3_1e-17/a_church_steeple_that_has_a_clock_on_it/a_church_steeple_that_has_a_clock_on_it.jpg' @ error/montage.c/MontageImageCommand/1790.
convert.im6: unable to open image `output/fc8_eps1_1e-3_eps3_1e-17/a_church_steeple_that_has_a_clock_on_it/a_church_steeple_that_has_a_clock_on_it.jpg': No such file or directory @ error/blob.c/OpenBlob/2641.
convert.im6: no images defined `output/fc8_eps1_1e-3_eps3_1e-17/a_church_steeple_that_has_a_clock_on_it/a_church_steeple_that_has_a_clock_on_it.jpg' @ error/convert.c/ConvertImageCommand/3044.
convert.im6: unable to open image `output/fc8_eps1_1e-3_eps3_1e-17/a_church_steeple_that_has_a_clock_on_it/a_church_steeple_that_has_a_clock_on_it.jpg': No such file or directory @ error/blob.c/OpenBlob/2641.
convert.im6: no images defined `output/fc8_eps1_1e-3_eps3_1e-17/a_church_steeple_that_has_a_clock_on_it/a_church_steeple_that_has_a_clock_on_it.jpg' @ error/convert.c/ConvertImageCommand/3044.
/root/ppgn/output/fc8_eps1_1e-3_eps3_1e-17/a_church_steeple_that_has_a_clock_on_it/a_church_steeple_that_has_a_clock_on_it.jpg
I cloned the the caffe_lrcn from the source you linked, and I updated the settings.py file accordingly: caffe_root = "~/caffe_lrcn/python"
where I have my tree structured as the following:
drwxr-xr-x 20 root root 4096 Jan 23 16:05 caffe
drwxr-xr-x 13 root root 4096 Jan 23 15:33 caffe_lrcn
drwxr-xr-x 13 root root 4096 Jan 23 16:17 ppgn
I don’t have any problems running the other four examples. Also, I’m getting the Failed to initialize libdc1394
error because I’m running this in a Docker container, and others have reported a similar problem, though it usually doesn’t appear to cause any problems.
Any thoughts? Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:23 (7 by maintainers)
Top Results From Across the Web
Image captioning giving weak results - Stack Overflow
I have tried running this model on the all 5 captions of the first 100 images of FLickr8k test dataset for 50 epochs....
Read more >Image captioning with visual attention | TensorFlow Core
The steps are: Load the images (and ignore images that fail to load). Replicate images to match the number of captions. Shuffle and...
Read more >A Modern Image Captioning Approach Based on Improved ...
Automatic image captioning is a challenging problem in computer vision, and it aims to generate rich content and human-understandable ...
Read more >Unpaired Cross-lingual Image Caption Generation with Self ...
In this paper, we propose to generate cross-lingual image captions with self-supervised rewards in the reinforcement learning framework to ...
Read more >Deliberate Attention Networks for Image Captioning
learning to disambiguate image/caption pairs and reduce ex- posure bias. ... But small errors on generated words may be enlarged.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok something just crazy happened to me. I was having all the issues you have and struggeling to find an answer. I tried everything I found online and what you are saying here, nothing worked. Last hope, I downloaded the anh repo in order to build it again WHILE building caffe again with standard settings for gpu … and now it works . Even when I recompiled exactly with the same settings that were giving me issues before… So no big help here, maybe just download the repo, place it in the same folder as the other repo, and cross your fingers. Sorry for the non scientific looking of this answer but It just happened to me now so I share.
@jannesss delete the line CHECK(!propagate_down[0]) << "Can’t backpropagate to EmbedLayer input.” in embed_layer.cpp. It worked for me.