Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
combo
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Syntactic Tools
combo
Commits
2fc4448a
Commit
2fc4448a
authored
1 year ago
by
Martyna Wiącek
Browse files
Options
Downloads
Patches
Plain Diff
changed softmax to inner product in matrix
parent
a843ed90
Branches
save_deprel_matrix_to_npz
No related merge requests found
Pipeline
#15100
failed with stage
in 2 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
combo/models/parser.py
+4
-2
4 additions, 2 deletions
combo/models/parser.py
with
4 additions
and
2 deletions
combo/models/parser.py
+
4
−
2
View file @
2fc4448a
...
...
@@ -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
"
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment