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 merge requests found
Pipeline #15100 failed with stage
in 2 minutes and 38 seconds
......@@ -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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment