Skip to content

Commit

Permalink
Fixed bug in MaskedSpecAug that overestimates samples. (#6775)
Browse files Browse the repository at this point in the history
Signed-off-by: tbartley94 <[email protected]>
  • Loading branch information
tbartley94 committed Jun 6, 2023
1 parent 3063e32 commit 010a0e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nemo/collections/asr/modules/audio_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def forward(self, input_spec, length):

for idx in range(input_spec.shape[0]):
cur_len = length[idx]
patches = range(cur_len // self.patch_size - 1)
patches = range(cur_len // self.patch_size)
masked_patches = random.sample(patches, mask_patches)

for mp in masked_patches:
Expand Down

0 comments on commit 010a0e6

Please sign in to comment.