hy-struggle / PRGC

PRGC: Potential Relation and Global Correspondence Based Joint Relational Triple Extraction
107 stars 16 forks source link

python train.py出现错误,寻求解决 #29

Open KiteAB34 opened 5 months ago

KiteAB34 commented 5 months ago

最初是这个错误ile "train.py", line 224, in train_and_evaluate(model, params, ex_params, args.restore_file) File "train.py", line 153, in train_and_evaluate valmetrics, , _ = evaluate(model, val_loader, params, ex_params, mark='Val') File "/home/hem/project/PRGC-main/evaluate.py", line 94, in evaluate pred_seqs, pre_corres, xi, pred_rels = model(input_ids, attention_mask=attention_mask, ValueError: not enough values to unpack (expected 4, got 3) 自己做了修改,报的是这个错误 Traceback (most recent call last): File "train.py", line 224, in train_and_evaluate(model, params, ex_params, args.restore_file) File "train.py", line 153, in train_and_evaluate valmetrics, , _ = evaluate(model, val_loader, params, ex_params, mark='Val') File "/home/hem/project/PRGC-main/evaluate.py", line 100, in evaluate pre_corres = pre_corres.detach().cpu().numpy() AttributeError: 'NoneType' object has no attribute 'detach' 有遇到相同错误的吗?寻求帮助

KaiserLord commented 5 months ago

你好朋友,我现在遇到了相同的问题,甚至我做出了跟你一样的修改后也遇到了相同的问题。 请问你解决了这个问题吗

KiteAB34 commented 5 months ago

@KaiserLord 你好,我还没解决,你解决这个问题了吗?

KiteAB34 commented 5 months ago

你好朋友,我现在遇到了相同的问题,甚至我做出了跟你一样的修改后也遇到了相同的问题。 请问你解决了这个问题吗

我还没解决,,你解决了吗

KaiserLord commented 5 months ago

你好朋友,我现在遇到了相同的问题,甚至我做出了跟你一样的修改后也遇到了相同的问题。 请问你解决了这个问题吗

我还没解决,,你解决了吗

你好我解决了,你需要把两个参数:ensure_corres和ensure_rel 设置为True就可以了

KiteAB34 commented 5 months ago

你好,你现在的代码运行了吗?可以发一份给我吗?谢谢

------------------ 原始邮件 ------------------ 发件人: "Ricardo M. @.>; 发送时间: 2024年4月3日(星期三) 下午4:13 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [hy-struggle/PRGC] python train.py出现错误,寻求解决 (Issue #29)

你好朋友,我现在遇到了相同的问题,甚至我做出了跟你一样的修改后也遇到了相同的问题。 请问你解决了这个问题吗

我还没解决,,你解决了吗

你好我解决了,你需要把两个参数:ensure_corres和ensure_rel 设置为True就可以了

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

KaiserLord commented 5 months ago

你好,你现在的代码运行了吗?可以发一份给我吗?谢谢 ------------------ 原始邮件 ------------------ 发件人: "Ricardo M. @.>; 发送时间: 2024年4月3日(星期三) 下午4:13 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [hy-struggle/PRGC] python train.py出现错误,寻求解决 (Issue #29) 你好朋友,我现在遇到了相同的问题,甚至我做出了跟你一样的修改后也遇到了相同的问题。 请问你解决了这个问题吗 我还没解决,,你解决了吗 你好我解决了,你需要把两个参数:ensure_corres和ensure_rel 设置为True就可以了 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

修改后还不行吗

KiteAB34 commented 5 months ago

不行,你那里方便发一份可以运行的PRGC代码吗?科研小白

------------------ 原始邮件 ------------------ 发件人: "hy-struggle/PRGC" @.>; 发送时间: 2024年4月7日(星期天) 上午10:42 @.>; @.**@.>; 主题: Re: [hy-struggle/PRGC] python train.py出现错误,寻求解决 (Issue #29)

你好,你现在的代码运行了吗?可以发一份给我吗?谢谢 … ------------------ 原始邮件 ------------------ 发件人: "Ricardo M. @.>; 发送时间: 2024年4月3日(星期三) 下午4:13 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [hy-struggle/PRGC] python train.py出现错误,寻求解决 (Issue #29) 你好朋友,我现在遇到了相同的问题,甚至我做出了跟你一样的修改后也遇到了相同的问题。 请问你解决了这个问题吗 我还没解决,,你解决了吗 你好我解决了,你需要把两个参数:ensure_corres和ensure_rel 设置为True就可以了 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

修改后还不行吗

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

KaiserLord commented 4 months ago

不行,你那里方便发一份可以运行的PRGC代码吗?科研小白 ------------------ 原始邮件 ------------------ 发件人: "hy-struggle/PRGC" @.>; 发送时间: 2024年4月7日(星期天) 上午10:42 @.>; @.**@.>; 主题: Re: [hy-struggle/PRGC] python train.py出现错误,寻求解决 (Issue #29) 你好,你现在的代码运行了吗?可以发一份给我吗?谢谢 … ------------------ 原始邮件 ------------------ 发件人: "Ricardo M. @.>; 发送时间: 2024年4月3日(星期三) 下午4:13 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [hy-struggle/PRGC] python train.py出现错误,寻求解决 (Issue #29) 你好朋友,我现在遇到了相同的问题,甚至我做出了跟你一样的修改后也遇到了相同的问题。 请问你解决了这个问题吗 我还没解决,,你解决了吗 你好我解决了,你需要把两个参数:ensure_corres和ensure_rel 设置为True就可以了 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> 修改后还不行吗 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

哦哦好的,我看看你的邮箱在哪

KaiserLord commented 4 months ago

不行,你那里方便发一份可以运行的PRGC代码吗?科研小白 ------------------ 原始邮件 ------------------ 发件人: "hy-struggle/PRGC" @.>; 发送时间: 2024年4月7日(星期天) 上午10:42 @.>; @.**@.>; 主题: Re: [hy-struggle/PRGC] python train.py出现错误,寻求解决 (Issue #29) 你好,你现在的代码运行了吗?可以发一份给我吗?谢谢 … ------------------ 原始邮件 ------------------ 发件人: "Ricardo M. @.>; 发送时间: 2024年4月3日(星期三) 下午4:13 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [hy-struggle/PRGC] python train.py出现错误,寻求解决 (Issue #29) 你好朋友,我现在遇到了相同的问题,甚至我做出了跟你一样的修改后也遇到了相同的问题。 请问你解决了这个问题吗 我还没解决,,你解决了吗 你好我解决了,你需要把两个参数:ensure_corres和ensure_rel 设置为True就可以了 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> 修改后还不行吗 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

你可以在我的github主页下载:[PRGC-syc]仓库,并独立下载bert模型就可以运行了