Skip to content

Commit

Permalink
Merge 52a40ca into 2d27cad
Browse files Browse the repository at this point in the history
  • Loading branch information
kmkurn committed Mar 22, 2020
2 parents 2d27cad + 52a40ca commit d2938ad
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 @@ -13,7 +13,7 @@ def _convert(logits):

N = logits.size(1)
new_logits[:, 0, 1:] = logits[:, torch.arange(N), torch.arange(N)]
new_logits[:, torch.arange(1, N), torch.arange(1, N)] = -1e9
new_logits[:, torch.arange(1, N + 1), torch.arange(1, N + 1)] = -1e9
return new_logits


Expand Down

0 comments on commit d2938ad

Please sign in to comment.