Skip to content

Commit

Permalink
feat: add mean and logvar info to variational bottleneck
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioschneider committed Oct 15, 2022
1 parent 7fabeb3 commit 58db626
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion audio_diffusion_pytorch/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ def forward(
logvar = torch.clamp(logvar, -30.0, 20.0)
out = gaussian_sample(mean, logvar)
loss = kl_loss(mean, logvar) * self.loss_weight
return (out, dict(loss=loss)) if with_info else out
return (out, dict(loss=loss, mean=mean, logvar=logvar)) if with_info else out


class AutoEncoder1d(nn.Module):
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-diffusion-pytorch",
packages=find_packages(exclude=[]),
version="0.0.64",
version="0.0.65",
license="MIT",
description="Audio Diffusion - PyTorch",
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 58db626

Please sign in to comment.