LiuLei95 / PyTorch-Learned-Image-Compression-with-GMM-and-Attention

This repo is implementation for Learned Image Compression with Discretized Gaussian Mixture Likelihoods and Attention Modules in pytorch.
Apache License 2.0
62 stars 2 forks source link

Value ERROR:拉普拉斯分布 #3

Closed SailVR closed 2 years ago

SailVR commented 2 years ago

Expected parameter scale (Tensor of shape (8, 192, 16, 16)) of distribution Laplace(loc: torch.Size([8, 192, 16, 16]), scale: torch.Size([8, 192, 16, 16])) to satisfy the constraint GreaterThan(lower_bound=0.0), but found invalid values: 不知道作者有木有遇到过拉普拉斯分布遇到的valueerror

SailVR commented 2 years ago

解决了问题,应该是超出了精度范围,用上clamp限制范围在(1e-10,1e10)之间就没有报错了