diff --git a/tests/test_layers.py b/tests/test_layers.py index 6e3c4b1..7d02b67 100644 --- a/tests/test_layers.py +++ b/tests/test_layers.py @@ -119,7 +119,7 @@ class EncoderTests(unittest.TestCase): class L1LossMaskedTests(unittest.TestCase): def test_in_out(self): # test input == target - layer = L1LossMasked() + layer = L1LossMasked(seq_len_norm=False) dummy_input = T.ones(4, 8, 128).float() dummy_target = T.ones(4, 8, 128).float() dummy_length = (T.ones(4) * 8).long() diff --git a/tests/test_tacotron2_model.py b/tests/test_tacotron2_model.py index a26f1dd..aa2869e 100644 --- a/tests/test_tacotron2_model.py +++ b/tests/test_tacotron2_model.py @@ -38,7 +38,7 @@ class TacotronTrainTest(unittest.TestCase): stop_targets.size(1) // c.r, -1) stop_targets = (stop_targets.sum(2) > 0.0).unsqueeze(2).float().squeeze() - criterion = MSELossMasked().to(device) + criterion = MSELossMasked(seq_len_norm=False).to(device) criterion_st = nn.BCEWithLogitsLoss().to(device) model = Tacotron2(num_chars=24, r=c.r, num_speakers=5).to(device) model.train() diff --git a/tests/test_tacotron_model.py b/tests/test_tacotron_model.py index 7e5e8da..ac6712b 100644 --- a/tests/test_tacotron_model.py +++ b/tests/test_tacotron_model.py @@ -44,7 +44,7 @@ class TacotronTrainTest(unittest.TestCase): stop_targets = (stop_targets.sum(2) > 0.0).unsqueeze(2).float().squeeze() - criterion = L1LossMasked().to(device) + criterion = L1LossMasked(seq_len_norm=False).to(device) criterion_st = nn.BCEWithLogitsLoss().to(device) model = Tacotron( num_chars=32, @@ -106,7 +106,7 @@ class TacotronGSTTrainTest(unittest.TestCase): stop_targets = (stop_targets.sum(2) > 0.0).unsqueeze(2).float().squeeze() - criterion = L1LossMasked().to(device) + criterion = L1LossMasked(seq_len_norm=False).to(device) criterion_st = nn.BCEWithLogitsLoss().to(device) model = Tacotron( num_chars=32,