Why the build model part of these two files (P_cause.py and P_emotion.py) is the same, it should be different from the paper.
guo-huojian opened this issue · 1 comments
General Response
hi, they are actually different. The reason is that the source code is not very readable of the build_model
part. The order of return values of function build_model
is different in P_emotion.py and P_cause.py. In P_emotion.py, it's return pred_pos, pred_cause, reg
. And in P_cause.py, it's return pred_cause, pred_pos, reg
. As a result, model implementation is the same with paper. It's just an issue about the naming problem. If you want to find a readable version of ECPE implementation, my PyTorch implementation might be helpful, and the link is https://github.com/bbruceyuan/ECPE-PyTorch.
Detail explanation
the scope name in P_emotion.py and P_cause.py are different.
u will find in P_cause.py, the author predict cause first and concatenates predict cause logits with clause representation to predict emotion.
While in P_emotion.py, the author predicts emotion first and concatenates predict emotion logits with clause representation to predict cause.