Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasha committed Nov 26, 2019
1 parent 0e0a2a6 commit 8426ff4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch_struct/linearchain.py
Expand Up @@ -84,7 +84,7 @@ def _dp_scan(self, log_potentials, lengths=None, force_grad=False):
# Scan
for n in range(1, log_N + 1):
chart = semiring.matmul(chart[:, :, 1::2], chart[:, :, 0::2])
v = semiring.sum(semiring.sum(chart[:, :, 0]))
v = semiring.sum(semiring.sum(chart[:, :, 0].contiguous()))
return v, [log_potentials], None

# def _dp_standard(self, edge, lengths=None, force_grad=False):
Expand Down

0 comments on commit 8426ff4

Please sign in to comment.