mynlp / cst_captioning

PyTorch Implementation of Consensus-based Sequence Training for Video Captioning
59 stars 17 forks source link

give an example to use make test for your model? #6

Closed xiadingZ closed 6 years ago

xiadingZ commented 6 years ago

can you give an example to use make test for your model? I want to see the final score. Thanks.

xiadingZ commented 6 years ago

I run this commad

make train GID=0 MODEL_TYPE=concat EXP_NAME=CST_MS_SCBSTAR FEATS="resnet c3d mfcc category" USE_RL=1 USE_CST=1 USE_MIXER=1 MIXER_FROM=1 SCB_BASELINE=2 SCB_CAPTIONS=20 USE_EOS=1 LOGLEVEL=DEBUG MAX_EPOCHS=200 START_FROM=output/model/cst_best/resnetc3dmfcccategory_msrvtt_concat_CIDEr_64_0.0001.pth

it throws error as:

Traceback (most recent call last):
  File "train.py", line 529, in <module>
    rl_criterion=rl_criterion)
  File "train.py", line 79, in train
    model.load_state_dict(checkpoint['model'])
  File "/home/xiading/anaconda3/envs/py2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 519, in load_state_dict
    .format(name, own_state[name].size(), param.size()))
RuntimeError: While copying the parameter named feat_pool.feat_list.3.0.weight, whose dimensions in the model are torch.Size([512, 300]) and whose dimensions in the checkpoint are torch.Size([512, 20]).
plsang commented 6 years ago

Given that you follow my naming convention, you can test a model by specifying the EXP_NAME and FEATS. For example: make test GID=0 EXP_NAME=CST_MS_SCBSTAR FEATS="resnet c3d mfcc category"

xiadingZ commented 6 years ago

Thanks, I have reproduced cider score 54.2 using your model.