guanghuixu / AnchorCaptioner

Other
32 stars 10 forks source link

train the BUTD model on TextCaps #11

Closed Caroline0728 closed 2 years ago

Caroline0728 commented 2 years ago

你好,最近在使用您代码中在TextCaps上训练BUTD模型,现已经完成训练得到了best.ckpt,但是在测试的时候出现没有'reference_tokens'的KeyError的问题,我打印了sample_info 信息,是存在reference_tokens的,也完成了训练,是测试的imb出现问题了吗?请问您是否遇到过这个问题?
后续我直接使用这个训练好的模型进行Evaluate,出现了维度不匹配的问题,不知是否与上面训练时缺少reference_tokens有关,希望得到您的恢复,谢谢 image image

guanghuixu commented 2 years ago

抱歉,我没遇到过这个错误。在textcap的val跟test上应该不会出这个问题,请问是更换了val/test set吗?如果更换了的话可以对比数据集的差异定位下原因

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年3月2日(星期三) 下午3:45 收件人: @.>; 抄送: @.***>; 主题: [guanghuixu/AnchorCaptioner] train the BUTD model on TextCaps (Issue #11)

你好,最近在使用您代码中在TextCaps上训练BUTD模型,现已经完成训练得到了best.ckpt,但是在测试的时候出现没有'reference_tokens'的KeyError的问题,我打印了sample_info 信息,是存在reference_tokens的,也完成了训练,是测试的imb出现问题了吗?请问您是否遇到过这个问题? 后续我直接使用这个训练好的模型进行Evaluate,出现了维度不匹配的问题,不知是否与上面训练时缺少reference_tokens有关,希望得到您的恢复,谢谢

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Caroline0728 commented 2 years ago

我使用的就是configs/captioning/m4c_captioner中的BUTD.yml的配置文件; 这个配置文件中的imdb_files和image_features 都与m4c_captioner.yml中不一致,使用BUTD模型在TextCaps上训练,是都这里的配置文件需要保持一致?

guanghuixu commented 2 years ago

BUTD的train跟val使用的config文件不同,请使用 --config configs/captioning/m4c_textcaps/butd_beam_search.yml 可以参考这个ReadMe

Caroline0728 commented 2 years ago

BUTD train使用的是butd.yml;val使用的是butd_beam_search.yml,没有使用错; 但是在train的时候,进行到Starting inference on Text set时出现KeyError; 我用train得到的best.skpt进行val的时候,出现维度不匹配的情况;您之前没有遇到到这个情况是嘛

guanghuixu commented 2 years ago

没有遇到过,readme上的脚本是能直接跑的。你贴一下训练跟测试的脚本上来看看?

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年3月2日(星期三) 下午4:39 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [guanghuixu/AnchorCaptioner] train the BUTD model on TextCaps (Issue #11)

BUTD train使用的是butd.yml;val使用的是butd_beam_search.yml,没有使用错; 但是在train的时候,进行到Starting inference on Text set时出现KeyError; 我用train得到的best.skpt进行val的时候,出现维度不匹配的情况;您之前没有遇到到这个情况是嘛

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

Caroline0728 commented 2 years ago

image 我没有多卡并行训练

guanghuixu commented 2 years ago

从训练脚本上没看出什么问题,你看看是不是数据集的问题