Commit 1e23d214 authored by Jason Lian's avatar Jason Lian
Browse files

Apply feedback

parent 2870d248
......@@ -323,7 +323,7 @@ def mu_law_encoding(x, qc):
mu = torch.tensor(mu, dtype=x.dtype)
x_mu = torch.sign(x) * torch.log1p(mu *
torch.abs(x)) / torch.log1p(mu)
x_mu = ((x_mu + 1) / 2 * mu + 0.5).long()
x_mu = ((x_mu + 1) / 2 * mu + 0.5).to(torch.int64)
return x_mu
......
......@@ -434,10 +434,10 @@ class MuLawExpanding(object):
"""
Args:
x_mu (FloatTensor/LongTensor)
x_mu (Tensor)
Returns:
x (FloatTensor)
x (Tensor)
"""
return F.mu_law_expanding(x_mu, self.qc)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment