Skip to content

Commit

Permalink
add back fairseq manual_seed
Browse files Browse the repository at this point in the history
add back rnnt_test
  • Loading branch information
Sean Kim committed Jun 2, 2022
1 parent e410998 commit 325653b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def test_import_finetuning_model(self, config, _):
imported = import_fairseq_model(original).eval()

# Without mask
torch.manual_seed(0)
x = torch.randn(batch_size, num_frames)
ref = original(x, torch.zeros_like(x))["encoder_out"].transpose(0, 1)
hyp, _ = imported(x)
Expand Down
1 change: 1 addition & 0 deletions test/torchaudio_unittest/prototype/rnnt_test_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def _get_joiner_input(self):

def setUp(self):
super().setUp()
torch.random.manual_seed(31)

def test_torchscript_consistency_forward(self):
r"""Verify that scripting RNNT does not change the behavior of method `forward`."""
Expand Down

0 comments on commit 325653b

Please sign in to comment.