Skip to content

Commit

Permalink
Update deptree.py
Browse files Browse the repository at this point in the history
  • Loading branch information
srush committed Mar 24, 2020
1 parent 9f5a0f5 commit a8ed72b
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 @@ -193,7 +193,7 @@ def deptree_part(arc_scores, eps=1e-5):
lap = laplacian.masked_fill(eye != 0, 0)
lap = -lap + torch.diag_embed(lap.sum(1), offset=0, dim1=-2, dim2=-1)
lap[:, 0] = torch.diagonal(input, 0, -2, -1).exp()
return lap.det().log()
return lap.logdet()


def deptree_nonproj(arc_scores, eps=1e-5):
Expand Down

0 comments on commit a8ed72b

Please sign in to comment.