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

Method testEncodeIsSurjective

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

Source from the content-addressed store, hash-verified

104 self.assertAllClose(x1, x2)
105
106 def testEncodeIsSurjective(self):
107 x = np.linspace(-1, 1, 10000).astype(np.float32)
108 channels = 123
109 with self.test_session() as sess:
110 encoded = sess.run(mu_law_encode(x, channels))
111 self.assertEqual(len(np.unique(encoded)), channels)
112
113 def testEncodePrecomputed(self):
114 channels = 256

Callers

nothing calls this directly

Calls 1

mu_law_encodeFunction · 0.90

Tested by

no test coverage detected