forked from mrq/DL-Art-School
tolong
This commit is contained in:
parent
9f16b25ce5
commit
40f844657b
|
@ -641,7 +641,7 @@ class ContrastiveTrainingWrapper(nn.Module):
|
||||||
mel[:, freq_start:freq_start+freq_mask_width] = 0
|
mel[:, freq_start:freq_start+freq_mask_width] = 0
|
||||||
|
|
||||||
# Build input masks from inp_lengths if possible.
|
# Build input masks from inp_lengths if possible.
|
||||||
attention_mask = torch.ones_like(mel)
|
attention_mask = torch.ones_like(mel).long()
|
||||||
if inp_lengths is not None:
|
if inp_lengths is not None:
|
||||||
inp_lengths = inp_lengths // self.inp_length_factor
|
inp_lengths = inp_lengths // self.inp_length_factor
|
||||||
for i, l in enumerate(inp_lengths):
|
for i, l in enumerate(inp_lengths):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user