def test_wpe(self): with self.test_session() as sess: Y = tf.convert_to_tensor(self.Y) enhanced, inv_power = tf_wpe.single_frequency_wpe(Y, iterations=1) enhanced = sess.run(enhanced) ref = wpe.wpe_v7(self.Y, iterations=1, statistics_mode='valid') np.testing.assert_allclose(enhanced, ref)
def test_wpe_step(self): with self.test_session() as sess: Y = tf.convert_to_tensor(self.Y[None]) enhanced, inv_power = tf_wpe.single_frequency_wpe(Y[0], iterations=3) step_enhanced = tf_wpe.wpe_step(Y, inv_power[None]) enhanced, step_enhanced = sess.run([enhanced, step_enhanced]) np.testing.assert_allclose(enhanced, step_enhanced[0])