Skip to content

Commit 2ca7120

Browse files
fix: wrong vae bottleneck
1 parent 2410c7a commit 2ca7120

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

audio_encoders_pytorch/modules.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ def forward(
581581
) -> Union[Tensor, Tuple[Tensor, Any]]:
582582
mean_and_std = self.to_mean_and_std(x)
583583
mean, std = mean_and_std.chunk(chunks=2, dim=1)
584-
std = torch.tanh(std) # mean in range [-1, 1]
585-
mean = torch.tanh(mean) + 1.0 # std in range [0, 2]
584+
mean = torch.tanh(mean) # mean in range [-1, 1]
585+
std = torch.tanh(std) + 1.0 # std in range [0, 2]
586586
out = gaussian_sample(mean, std)
587587
info = dict(
588588
variational_kl_loss=kl_loss(mean, std) * self.loss_weight,

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name="audio-encoders-pytorch",
55
packages=find_packages(exclude=[]),
6-
version="0.0.12",
6+
version="0.0.13",
77
license="MIT",
88
description="Audio Encoders - PyTorch",
99
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)