yangjianxin1 / ClipCap-Chinese

基于ClipCap的看图说话Image Caption模型
286 stars 40 forks source link

No such file or directory: 'output/mlp_finetune/checkpoint-35000.pt #7

Open yywhsgnd opened 1 year ago

yywhsgnd commented 1 year ago

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)) File "/home/jupyter/miniforge3/envs/env1/lib/python3.7/site-packages/torch/serialization.py", line 699, in load with _open_file_like(f, 'rb') as opened_file: File "/home/jupyter/miniforge3/envs/env1/lib/python3.7/site-packages/torch/serialization.py", line 231, in _open_file_like return _open_file(name_or_buffer, mode) File "/home/jupyter/miniforge3/envs/env1/lib/python3.7/site-packages/torch/serialization.py", line 212, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'output/mlp_finetune/checkpoint-35000.pt

Espere-1119-Song commented 1 year ago

maybe you can find checkpoint-35000.pt in directory finetune under directory output

yywhsgnd commented 1 year ago

好的,找到了,我更改了一下文件名

---Original--- From: @.> Date: Wed, Dec 28, 2022 20:25 PM To: @.>; Cc: @.**@.>; Subject: Re: [yangjianxin1/ClipCap-Chinese] No such file or directory:'output/mlp_finetune/checkpoint-35000.pt (Issue #7)

maybe you can find checkpoint-35000.pt in directory finetune under directory output

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Espere-1119-Song commented 1 year ago

那你有遇到过这个问题吗

Traceback (most recent call last): File "predict.py", line 197, in main(args) File "predict.py", line 156, in main captions = generate(model, clip_embeds, tokenizer, args) File "predict.py", line 80, in generate out = model.gpt2(inputs_embeds=inputs_embeds) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, *kwargs) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/transformers/models/gpt2/modeling_gpt2.py", line 971, in forward lm_logits = self.lm_head(hidden_states) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(input, **kwargs) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 105, in forward return F.linear(input.float(), self.weight.float(), self.bias.float()) AttributeError: 'NoneType' object has no attribute 'float'

yywhsgnd commented 1 year ago

没有遇到,你是运行到哪部时出现了这个问题

---Original--- From: @.> Date: Wed, Dec 28, 2022 20:36 PM To: @.>; Cc: @.**@.>; Subject: Re: [yangjianxin1/ClipCap-Chinese] No such file or directory:'output/mlp_finetune/checkpoint-35000.pt (Issue #7)

那你有遇到过这个问题吗

Traceback (most recent call last): File "predict.py", line 197, in main(args) File "predict.py", line 156, in main captions = generate(model, clip_embeds, tokenizer, args) File "predict.py", line 80, in generate out = model.gpt2(inputs_embeds=inputs_embeds) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, *kwargs) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/transformers/models/gpt2/modeling_gpt2.py", line 971, in forward lm_logits = self.lm_head(hidden_states) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(input, **kwargs) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 105, in forward return F.linear(input.float(), self.weight.float(), self.bias.float()) AttributeError: 'NoneType' object has no attribute 'float'

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Espere-1119-Song commented 1 year ago

train完no_finetune之后predict的时候

yywhsgnd commented 1 year ago

也就是说现在你是MLp进行生成时遇到了问题?

---Original--- From: @.> Date: Wed, Dec 28, 2022 20:36 PM To: @.>; Cc: @.**@.>; Subject: Re: [yangjianxin1/ClipCap-Chinese] No such file or directory:'output/mlp_finetune/checkpoint-35000.pt (Issue #7)

那你有遇到过这个问题吗

Traceback (most recent call last): File "predict.py", line 197, in main(args) File "predict.py", line 156, in main captions = generate(model, clip_embeds, tokenizer, args) File "predict.py", line 80, in generate out = model.gpt2(inputs_embeds=inputs_embeds) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, *kwargs) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/transformers/models/gpt2/modeling_gpt2.py", line 971, in forward lm_logits = self.lm_head(hidden_states) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(input, **kwargs) File "/home/exs/Anaconda3/envs/cliipcap/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 105, in forward return F.linear(input.float(), self.weight.float(), self.bias.float()) AttributeError: 'NoneType' object has no attribute 'float'

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Espere-1119-Song commented 1 year ago

是这样的

yywhsgnd commented 1 year ago

你有改过代码吗?

---Original--- From: @.> Date: Wed, Dec 28, 2022 20:48 PM To: @.>; Cc: @.**@.>; Subject: Re: [yangjianxin1/ClipCap-Chinese] No such file or directory:'output/mlp_finetune/checkpoint-35000.pt (Issue #7)

是这样的

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Espere-1119-Song commented 1 year ago

我把train的数据集给换了

yywhsgnd commented 1 year ago

我把train的数据集给换了

你这情况我也没有用到,我的建议是你继续用flickr30的数据集复现一下,我用mlp生成时就只出现了torch和cpu\gpu的问题

Espere-1119-Song commented 1 year ago

好的谢谢

yywhsgnd commented 1 year ago

没事,请问您有没有执行最后一步时生成的caption-generate_no_finetune.txt是个空文件夹

---Original--- From: @.> Date: Wed, Dec 28, 2022 21:02 PM To: @.>; Cc: @.**@.>; Subject: Re: [yangjianxin1/ClipCap-Chinese] No such file or directory:'output/mlp_finetune/checkpoint-35000.pt (Issue #7)

好的谢谢

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Espere-1119-Song commented 1 year ago

哈哈哈哈我还没生成出来呢,执行finetune.sh的时候报错了

yywhsgnd commented 1 year ago

哈哈哈哈我还没生成出来呢,执行finetune.sh的时候报错了

好像readme里面生成那里finetune是finerune

Espere-1119-Song commented 1 year ago

那个我看到了

yywhsgnd commented 1 year ago

你下载到caption的中文数据集了吗?

---Original--- From: @.> Date: Wed, Dec 28, 2022 21:13 PM To: @.>; Cc: @.**@.>; Subject: Re: [yangjianxin1/ClipCap-Chinese] No such file or directory:'output/mlp_finetune/checkpoint-35000.pt (Issue #7)

那个我看到了

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Espere-1119-Song commented 1 year ago

额……我换了其他的image-caption数据集,预训练用的是gpt2,不是chinesegpt2

yywhsgnd commented 1 year ago

哦哦,好的,谢谢

---Original--- From: @.> Date: Wed, Dec 28, 2022 21:17 PM To: @.>; Cc: @.**@.>; Subject: Re: [yangjianxin1/ClipCap-Chinese] No such file or directory:'output/mlp_finetune/checkpoint-35000.pt (Issue #7)

额……我换了其他的image-caption数据集,预训练用的是gpt2,不是chinesegpt2

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

xiaozhouoo commented 11 months ago

请问一下您怎么解决的

J-Hoge commented 4 days ago

就是没有啊,怎么都没有