Skip to content

Commit

Permalink
Support single-root and multiple-root Eisner algorithm.
Browse files Browse the repository at this point in the history
  • Loading branch information
sonta committed Jul 27, 2020
1 parent c282a3d commit 35dbaa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch_struct/deptree.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DepTree(_Struct):
"""

def _dp(self, arc_scores_in, lengths=None, force_grad=False, cache=True):
multiroot = getattr(self, "multiroot")
multiroot = getattr(self, "multiroot", True)
if arc_scores_in.dim() not in (3, 4):
raise ValueError("potentials must have dim of 3 (unlabeled) or 4 (labeled)")

Expand Down

0 comments on commit 35dbaa1

Please sign in to comment.