(x, mu=255)
return out
A TF implementation of inverse Mu-Law.

  Args:
    x: The Mu-Law samples to decode.
    mu: The Mu we used to encode these samples.

  Returns:
    out: The decoded data.
A TF implementation of inverse Mu-Law.
A TF implementation of inverse Mu - Law .
def inv_mu_law(x, mu=255):
  """A TF implementation of inverse Mu-Law.

  Args:
    x: The Mu-Law samples to decode.
    mu: The Mu we used to encode these samples.

  Returns:
    out: The decoded data.
  """
  x = tf.cast(x, tf.float32)
  out = (x + 0.5) * 2. / (mu + 1)
  out = tf.sign(out) / mu * ((1 + mu)**tf.abs(out) - 1)
  out = tf.where(tf.equal(x, 0), x, out)
  return out
def inv_mu_law ( x , mu = 255 ) : x = tf . cast ( x , tf . float32 ) out = ( x + 0.5 ) * 2. / ( mu + 1 ) out = tf . sign ( out ) / mu * ( ( 1 + mu ) ** tf . abs ( out ) - 1 ) out = tf . where ( tf . equal ( x , 0 ) , x , out ) return out