investigate diff values

This commit is contained in:
mmoussallam
2020-06-18 20:17:03 +02:00
parent 0ed145fa3e
commit 94dedbe949
2 changed files with 4 additions and 2 deletions

View File

@@ -122,7 +122,7 @@ class Separator(object):
assert not (inverse and length is None)
data = np.asfortranarray(data)
N = self._params["frame_length"]
pad_edges = int(N/4)
pad_edges = int(N/2)
H = self._params["frame_step"]
win = hann(N, sym=False)
fstft = istft if inverse else stft

View File

@@ -74,9 +74,11 @@ def test_separator_backends(test_file):
for instrument in out_lib.keys():
# test that both outputs are not null
print(np.sum(np.abs(out_tf[instrument])))
print(np.sum(np.abs(out_lib[instrument])))
assert np.sum(np.abs(out_tf[instrument])) > 1000
assert np.sum(np.abs(out_lib[instrument])) > 1000
assert np.allclose(out_tf[instrument], out_lib[instrument], atol=0.1)
assert np.allclose(out_tf[instrument], out_lib[instrument], atol=0.01)
@pytest.mark.parametrize('test_file, configuration, backend', TEST_CONFIGURATIONS)