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

Method testDecodeRandomConstant

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

Source from the content-addressed store, hash-verified

217 self.assertAllEqual(decoded_manual, decode)
218
219 def testDecodeRandomConstant(self):
220 np.random.seed(40)
221
222 channels = 128
223 number_of_samples = 512
224 x = np.zeros(number_of_samples)
225 x.fill(np.random.uniform(-1, 1))
226 y = manual_mu_law_encode(x, channels)
227 decoded_manual = manual_mu_law_decode(y, channels)
228
229 with self.test_session() as sess:
230 decode = sess.run(mu_law_decode(y, channels))
231
232 self.assertAllEqual(decoded_manual, decode)
233
234 def testDecodeRamp(self):
235 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