ClipCap-Chinese icon indicating copy to clipboard operation
ClipCap-Chinese copied to clipboard

基于ClipCap的看图说话Image Caption模型

Results 18 ClipCap-Chinese issues
Sort by recently updated
recently updated
newest added

sh scripts/predict_finerune_gpt2.sh 2024-02-27 15:20:22.435851: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them...

训练集,测试集,验证集是要自己分吗?求大神告知

我已经把checkpoint-35000.pt放进文名为mlp_finetune的文件夹了,pytorch_model.bin放在gpt2文件夹,ViT-B-32.pt也放在了pretrain_models下面,可是依然说加载模型报错,请问大家有遇到过吗? [报错指向这一行:](https://github.com/yangjianxin1/ClipCap-Chinese/blob/master/predict.py#L129) raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for ClipCaptionModel: Missing key(s) in state_dict: "clip_project.model.0.weight", "clip_project.model.0.bias", "clip_project.model.2.weight", "clip_project.model.2.bias". Unexpected key(s) in state_dict: "gpt2.transformer.h.0.attn.bias", "gpt2.transformer.h.0.attn.masked_bias",...

谁知道这是什么问题?我没有用gpu,我用的是cpu来跑

请问作者是如何计算中文的评价指标的呢?代码可以开源嘛?

2022-12-28 11:48:11.682 | INFO | models.model:__init__:80 - random initialize gpt2 model Traceback (most recent call last): File "predict.py", line 186, in main(args) File "predict.py", line 129, in main model.load_state_dict(torch.load(args.model_path, map_location=args.device))...

错误如下: ``` Traceback (most recent call last): File "train.py", line 150, in main(args) File "train.py", line 131, in main train(model, train_dataloader, dev_dataloader, optimizer, scheduler, args) File "train.py", line 57, in...

(env1) jupyter@task_3050_yangyuwei:~/workspace/ClipCap-Chinese-master$ bash scripts/predict_no_finerune_gpt2.sh 2022-12-28 18:58:14.791 | INFO | models.model:__init__:80 - random initialize gpt2 model 2022-12-28 18:58:18.501 | INFO | __main__:main:138 - start predicting 0it [00:00, ?it/s]

作者你好,我是nlp初学者,请问为什么在计算交叉熵的时候要shift logits喃。 hift_logits = logits[..., args.prefix_len - 1:-1, :].contiguous().view(-1, logits.size(-1))

谁写eval文件了呀,能不能分享下