Skip to content
Snippets Groups Projects
Commit 2fc4448a authored by Martyna Wiącek's avatar Martyna Wiącek
Browse files

changed softmax to inner product in matrix

parent a843ed90
No related branches found
No related tags found
No related merge requests found
Pipeline #15100 failed
......@@ -155,8 +155,10 @@ class DependencyRelationModel(base.Predictor):
output = head_output
output["embedding"] = dep_rel_pred
#import pdb;pdb.set_trace()
output["deprel_label_distribution"] = F.softmax(relation_prediction[:, 1:, 1:], dim=-1)
output["deprel_tree_distribution"] = head_pred_soft
# output["deprel_label_distribution"] = F.softmax(relation_prediction[:, 1:, 1:], dim=-1)
output["deprel_label_distribution"] = relation_prediction[:, 1:, 1:]
# output["deprel_tree_distribution"] = head_pred_soft
output["deprel_tree_distribution"] = head_pred
if self.training:
output["prediction"] = (relation_prediction.argmax(-1)[:, 1:], head_output["prediction"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment