Skip to content

Commit 4f8a0d2

Browse files
committed
Retain the computational graph for marginals
1 parent c0b678f commit 4f8a0d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

supar/structs/dist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,4 @@ def forward(self, semiring):
127127
def backward(self, log_partition):
128128
return autograd.grad(log_partition,
129129
self.scores if isinstance(self.scores, torch.Tensor) else self.scores[0],
130-
retain_graph=True)[0]
130+
create_graph=True)[0]

0 commit comments

Comments
 (0)