Skip to content

Commit

Permalink
Remove the unused code in modules.py (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shengqiang-Li authored Mar 19, 2024
1 parent 35e4a17 commit 3f8c537
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,20 +578,3 @@ def forward(self, x, x_mask, g=None, reverse=False):
x1 = (x1 - m) * torch.exp(-logs) * x_mask
x = torch.cat([x0, x1], 1)
return x

x1, logabsdet = piecewise_rational_quadratic_transform(
x1,
unnormalized_widths,
unnormalized_heights,
unnormalized_derivatives,
inverse=reverse,
tails="linear",
tail_bound=self.tail_bound,
)

x = torch.cat([x0, x1], 1) * x_mask
logdet = torch.sum(logabsdet * x_mask, [1, 2])
if not reverse:
return x, logdet
else:
return x

0 comments on commit 3f8c537

Please sign in to comment.