MCPcopy
hub / github.com/ibab/tensorflow-wavenet / testDecodeRamp

Method testDecodeRamp

test/test_mu_law.py:234–247  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

232 self.assertAllEqual(decoded_manual, decode)
233
234 def testDecodeRamp(self):
235 np.random.seed(40)
236
237 channels = 128
238 number_of_samples = 512
239 number_of_steps = 2.0 / number_of_samples
240 x = np.arange(-1.0, 1.0, number_of_steps)
241 y = manual_mu_law_encode(x, channels)
242 decoded_manual = manual_mu_law_decode(y, channels)
243
244 with self.test_session() as sess:
245 decode = sess.run(mu_law_decode(y, channels))
246
247 self.assertAllEqual(decoded_manual, decode)
248
249 def testDecodeZeros(self):
250 np.random.seed(40)

Callers

nothing calls this directly

Calls 3

mu_law_decodeFunction · 0.90
manual_mu_law_encodeFunction · 0.85
manual_mu_law_decodeFunction · 0.85

Tested by

no test coverage detected