Skip to content

Commit

Permalink
fix: wrong vae bottleneck
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioschneider committed Nov 7, 2022
1 parent 2410c7a commit 2ca7120
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions audio_encoders_pytorch/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,8 @@ def forward(
) -> Union[Tensor, Tuple[Tensor, Any]]:
mean_and_std = self.to_mean_and_std(x)
mean, std = mean_and_std.chunk(chunks=2, dim=1)
std = torch.tanh(std) # mean in range [-1, 1]
mean = torch.tanh(mean) + 1.0 # std in range [0, 2]
mean = torch.tanh(mean) # mean in range [-1, 1]
std = torch.tanh(std) + 1.0 # std in range [0, 2]
out = gaussian_sample(mean, std)
info = dict(
variational_kl_loss=kl_loss(mean, std) * self.loss_weight,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name="audio-encoders-pytorch",
packages=find_packages(exclude=[]),
version="0.0.12",
version="0.0.13",
license="MIT",
description="Audio Encoders - PyTorch",
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 2ca7120

Please sign in to comment.