kimiyoung / review_net Goto Github PK
View Code? Open in Web Editor NEWReview Network for Caption Generation
License: MIT License
Review Network for Caption Generation
License: MIT License
2017-06-19 14:59:55 [INFO ] Image channels are 3, Image width is 256 and Image height is 256
2017-06-19 14:59:55 [INFO ] found 1550 images in train db/root/digits/digits/jobs/20170601-111739-f754/val_db
2017-06-19 14:59:55 [INFO ] Loading network definition from /root/digits/digits/jobs/20170619-145952-06b8/model
Using CuDNN backend
2017-06-19 14:59:56 [FAIL] bad argument #1 to '?' (expecting number or torch.DoubleTensor or torch.DoubleStorage at /tmp/luarocks_torch-scm-1-1041/torch7/generic/Tensor.c:1153)
DIGITS Lua Error
stack traceback:
[C]: at 0x7fb4bdb2cda0
[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'
/root/digits/digits/jobs/20170619-145952-06b8/model.lua:113: in function 'createModel'
/root/digits/digits/jobs/20170619-145952-06b8/model.lua:133: in function 'network_func'
/root/digits/digits/tools/torch/main.lua:288: in main chunk
[C]: in function 'dofile'
/root/digits/digits/tools/torch/wrapper.lua:25: in function </root/digits/digits/tools/torch/wrapper.lua:25>
[C]: in function 'xpcall'
/root/digits/digits/tools/torch/wrapper.lua:25: in main chunk
[C]: in function 'dofile'
/root/torch/install/
what is the problem. Is the problem model? or different thing. Can you help me?
Thank you..
It seems that the max_common
(https://github.com/kimiyoung/review_net/blob/master/code_caption/comp_prefix.lua#L2) is not correct. To access the ith element in the string s1
, s1:sub(i,i)
should be used. Not s1[i]
. s1[i]
is always nil
. The correct CS-k metrics should be:
MODEL_FILE reason.step8.litrans0.after1.merge0.model
#train batches 1074 #test batches 133
word_cnt 12859 token_cnt 20395
copy done
1 0.58108726620882
2 0.67359954807709
3 0.71993582684564
4 0.7437227668029
5 0.76213157058093
copy done
test loss 5.0341047093877
Hello, I have a little question here:
https://github.com/kimiyoung/review_net/blob/master/image_caption_offline/utils/model_utils.lua#L5
I know the function combines of many models, but it is so complex...
Why not set up a container and put all models into it and use the get parameters of the container? For example, If I want to combine parameters of model1,model2,model3
fake_net=nn.Sequential():add(model1):add(model2):add(model3)
parameters,gradients=fake_net:getParameters()
Hi,it is known to all that cnn-rnn model can benefit a lot from finetuning cnn. I want to ask why review network and many attention based model don't finetune cnn.thank you~
Thanks for sharing the code, it' s a wonderful job.
I have extracted the features and save them in data/
Howerer, I got an error with the following command :
th main.lua -model_pack reason_att_copy.lua -save_file -save_file_name model/ra.model
cloning 30
cloning soft_att_lstm
cloning reasoning lstm
/home/julius/torch/install/bin/luajit: bad argument #1 to '?' (string e
xpected, got nil)
stack traceback:
[C]: at 0x7f054d482ad0
[C]: in function 'DiskFile'
/home/julius/torch/install/share/lua/5.1/torch/File.lua:405: in
function 'load'
./dataloader.lua:127: in function 'gen_train_data'
...ect/review_net/image_caption_offline/reason_att_copy.lua:356
: in function 'train'
main.lua:33: in main chunk
[C]: in function 'dofile'
...lius/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145
: in main chunk
[C]: at 0x00406670
Hello,
I ran your baseline system with weight sharing and without discriminative loss, I only got BLEU-4 around 25.6 instead of 28.2 reported in the paper. May I ask you how many epochs did you train your model ? I trained it for 3-4 epochs and then it converges somehow.
Just a small suggestion. You can use the Bottle module to do the same thing.
Is there any explanation for the computation of CS-k (https://github.com/kimiyoung/review_net/blob/master/code_caption/rev_reason.lua#L271-L284)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.