Adding flatten to test
@@ -160,7 +160,7 @@ def test_sdr_loss():
clip_min = -30.0
LossSDR = ml.train.loss.SISDRLoss(reduction='none', clip_min=clip_min)
losses = LossSDR(references, references)
- assert all(l >= clip_min for l in losses)
+ assert all(l >= clip_min for l in losses.flatten())
def test_permutation_invariant_loss_sdr():
n_batch = 40
