Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
srush committed Sep 9, 2019
1 parent a6179d8 commit 1b6f731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch_struct/cky.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _dp(self, scores, lengths=None, force_grad=False):
for w in range(1, N):
Y = beta[A][:, : N - w, :w, :].view(batch, N - w, w, 1, S, 1)
Z = beta[B][:, w:, N - w :, :].view(batch, N - w, w, 1, 1, S)
Y, Z = Y.clone(), Z.clone()
# Y, Z = Y.clone(), Z.clone()
X_Y_Z = rules.view(batch, 1, NT, S, S)
rule_use[w - 1][:] = semiring.times(
semiring.sum(semiring.times(Y, Z), dim=2), X_Y_Z
Expand Down

0 comments on commit 1b6f731

Please sign in to comment.