Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Commit

Permalink
fix pwg gpu memory update too high
Browse files Browse the repository at this point in the history
  • Loading branch information
yt605155624 committed Oct 14, 2021
1 parent 29babf0 commit 5cac9dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions parakeet/models/parallel_wavegan/parallel_wavegan.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,9 @@ def forward(self, x, c):
skips = 0
for f in self.conv_layers:
x, s = f(x, c)
# Add depency with x to avoid lanching op too fast that leads
# to GPU memory reach too high value (ugly trick here)
c += paddle.mean(x - x)
skips += s
skips *= math.sqrt(1.0 / len(self.conv_layers))

Expand Down

0 comments on commit 5cac9dc

Please sign in to comment.