Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
leng-yue committed Apr 7, 2024
1 parent d313c63 commit 84354da
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion fish_vocoder/modules/discriminators/mpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils.parametrizations import weight_norm, spectral_norm
from torch.nn.utils.parametrizations import spectral_norm, weight_norm


class DiscriminatorP(nn.Module):
Expand Down
2 changes: 1 addition & 1 deletion fish_vocoder/modules/discriminators/mrd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils.parametrizations import weight_norm, spectral_norm
from torch.nn.utils.parametrizations import spectral_norm, weight_norm


class DiscriminatorR(torch.nn.Module):
Expand Down
5 changes: 2 additions & 3 deletions fish_vocoder/modules/encoders/convnext.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import torch.nn.functional as F
from torch import nn


# DropPath copied from timm library
def drop_path(
x, drop_prob: float = 0.0, training: bool = False, scale_by_keep: bool = True
Expand Down Expand Up @@ -176,9 +177,7 @@ def __init__(
self.downsample_layers.append(mid_layer)

self.stages = nn.ModuleList()
dp_rates = [
x.item() for x in torch.linspace(0, drop_path_rate, sum(depths))
]
dp_rates = [x.item() for x in torch.linspace(0, drop_path_rate, sum(depths))]

cur = 0
for i in range(len(depths)):
Expand Down
1 change: 0 additions & 1 deletion fish_vocoder/modules/generators/hifigan.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ def forward(self, x, template=None):
else:
x = self.resblocks[i](x)


x = self.activation_post(x)
x = self.conv_post(x)
x = torch.tanh(x)
Expand Down
6 changes: 3 additions & 3 deletions fish_vocoder/modules/generators/unify.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

class UnifyGenerator(nn.Module):
def __init__(
self,
backbone: nn.Module,
head: nn.Module,
self,
backbone: nn.Module,
head: nn.Module,
vq: nn.Module | None = None,
):
super().__init__()
Expand Down

0 comments on commit 84354da

Please sign in to comment.