SMHSA icon indicating copy to clipboard operation
SMHSA copied to clipboard

Relation detection module cannot learn anything.

Open Karldog opened this issue 4 years ago • 11 comments

In the process of running your public code, after 50 iters, the f1 score on the relation results is 0 nearly. Is there any need to modify your code?

Karldog avatar Sep 28 '20 07:09 Karldog

I also encountered the same problem. Did you solve it?

zlh-source avatar Oct 14 '20 11:10 zlh-source

This is a strange question that I haven't encountered. Is this problem in both datasets? Is the problem caused by the environment version?

chenshaowei57 avatar Oct 14 '20 13:10 chenshaowei57

我只在WebNLG上进行了实验,F1确实一直接近于0。似乎是因为输出矩阵过于稀疏而引起的这个问题。

zlh-source avatar Oct 14 '20 14:10 zlh-source

是从第一个epoch就存在问题么?

chenshaowei57 avatar Oct 14 '20 15:10 chenshaowei57

是从第一个epoch就存在问题么?

对。从头到尾一直都是。我训练到第70轮,F1只有0.13

zlh-source avatar Oct 14 '20 16:10 zlh-source

是从第一个epoch就存在问题么?

对。从头到尾一直都是。我训练到第70轮,F1只有0.13 我没有修改任何代码。

zlh-source avatar Oct 14 '20 16:10 zlh-source

那我再运行试试,这个问题之前还真没遇到过。

chenshaowei57 avatar Oct 14 '20 16:10 chenshaowei57

好的。谢谢啦! ------------------ 原始邮件 ------------------ 发件人: "chenshaowei57"<[email protected]> 发送时间: 2020年10月15日(星期四) 凌晨0:13 收件人: "chenshaowei57/SMHSA"<[email protected]>; 抄送: "zlh"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [chenshaowei57/SMHSA] Relation detection module cannot learn anything. (#6)

zlh-source avatar Oct 14 '20 16:10 zlh-source

那我再运行试试,这个问题之前还真没遇到过。

有进展麻烦同步下我,感谢🙏

Karldog avatar Oct 15 '20 07:10 Karldog

是从第一个epoch就存在问题么?

对。从头到尾一直都是。我训练到第70轮,F1只有0.13

我也遇到了这样的情况,在webnlg上F1几乎所有epoch都为0,但是nyt的F1和论文给的结果差不多。

Sirius11311 avatar Nov 07 '20 07:11 Sirius11311

可以把main函数中的随机种子设置注释掉,应该就可以了。 seed_num = 57 random.seed(seed_num) torch.manual_seed(seed_num) np.random.seed(seed_num) 原因可能是我没有加参数初始化的范围约束,所以我设的种子在你们的机器上可能会使得参数初始化到一个难以优化的区间。

chenshaowei57 avatar Nov 19 '20 01:11 chenshaowei57