doubledaibo / clcaption_nips2017 Goto Github PK
View Code? Open in Web Editor NEWContrastive Learning for Image Captioning
License: Other
Contrastive Learning for Image Captioning
License: Other
Hello Bo Dai,
I use cl_train_adaptiveattention.lua,
and I found that I can't reproduce the result in your paper.
After the 1st epoch training, I found that the CIDEr score is lower than the original model(before training) by ~0.15,
the training loss is about 4.01 and val loss is about 1.40.
As the training continues, training loss goes down slowly to 3.81.4,
and val loss goes up and down between 1.3
although the CIDEr score is improving, it still can't go higher than the original score.
I use the pre-trained model in AdaptiveAtteion as the target model and reference model, resnet-152 as CNN model and learning rate follows the value in your paper, which is 1e-6.
Could you please help me with this?
Thanks.
When several epochs' training finished and the code start to save the checkpoint, the error message shows:
/home/wcai/torch/install/bin/luajit: ./misc/utils.lua:28: attempt to index local 'file' (a nil value)
stack traceback:
./misc/utils.lua:28: in function 'write_json'
./misc/net_utils.lua:398: in function 'language_eval'
test.lua:261: in function 'evaluate_split'
test.lua:405: in main chunk
[C]: in function 'dofile'
...wcai/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50
But when I use the code of neuraltalk2, I can successfully save the checkpoint:
evaluating validation performance... 3200/3200 (9.179654)
validation loss: 9.1724067846911
wrote json checkpoint to model_id.json
iter 1: 9.124193
iter 2: 9.075657
...
wcai@tdtd-desktop ~/git/clcaption_nips2017 $ th cl_train_cross.lua
/home/wcai/torch/install/bin/luajit: /home/wcai/torch/install/share/lua/5.1/trepl/init.lua:389: /home/wcai/torch/install/share/lua/5.1/trepl/init.lua:389: /home/wcai/torch/install/share/lua/5.1/torch/init.lua:102: class nn.OneHot has been already assigned a parent class
stack traceback:
[C]: in function 'error'
/home/wcai/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
cl_train_cross.lua:11: in main chunk
[C]: in function 'dofile'
...wcai/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d80
I am new to torch, did I miss any package for running this code?Thanks.
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.