ruotianluo / ImageCaptioning.pytorch

I decide to sync up this repo and self-critical.pytorch. (The old master is in old master branch for archive)
MIT License
1.44k stars 412 forks source link

about train_beam_size in SCST training stage #121

Closed wanboyang closed 3 years ago

wanboyang commented 3 years ago

I use the train_beam_size shell script recommended from https://github.com/ruotianluo/ImageCaptioning.pytorch/blob/master/ADVANCED.md to train updown model. here are my shell scripts:

python tools/train.py --id updown --cfg configs/updown/updown.yml

bash scripts/copy_model.sh updown updown_rl_beam1

python tools/train.py --id updown_rl_beam1 --cfg configs/updown/updown_sc.yml --train_sample_method greedy --train_beam_size 5 --scheduled_sampling_start -1

However, RL train performs bad performances:

wanboyang commented 3 years ago

Here are Curves of CIDEr Scores, Losses and Rewards. Yellow line and blue line indicates no train_beam_size and train beam size, respectively. CIDEr QQ截图20210217195533 Loss loss Reward reward

ruotianluo commented 3 years ago

This is expected. You need to use a lower learning rate.

Even though, the performance is better with random sampling. (I didn't suggest to use it, I just provided this option)

wanboyang commented 3 years ago

Thanks for replying. I use scripts : python train.py --id fc_tdsc --cfg configs/fc_rl.yml --train_sample_method greedy --train_beam_size 5 --max_epochs 30 --learning_rate 5e-6 the RL training stage starts at 350k step, the performance corrupts. image what is learning rate you recommende?

wanboyang commented 3 years ago

I will try lower learning rates