Skip to content

Commit

Permalink
samplingwindow correct, range param masked_fill with small value
Browse files Browse the repository at this point in the history
  • Loading branch information
Seungwoo0326 committed Jul 14, 2021
1 parent 523ec24 commit 3b20220
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def forward(self, encoder_output, duration, mask):
range_param_prediction = self.range_param_proj(range_param_prediction)
range_param_prediction = range_param_prediction.squeeze(-1) # [B, L]
if mask is not None:
range_param_prediction = range_param_prediction.masked_fill(mask, 0.0)
range_param_prediction = range_param_prediction.masked_fill(mask, 1e-8)

return range_param_prediction

Expand Down Expand Up @@ -220,6 +220,6 @@ def forward(self, encoder_output, audio, seq_starts=None, full_len=False):
return encoder_output, audio
if encoder_output.shape[1] > self.segment_length:
encoder_segment = self.get_hidden_segment(encoder_output, seq_starts)
encoder_segment = self.pad_seq(encoder_output, self.segment_length)
encoder_segment = self.pad_seq(encoder_segment, self.segment_length)
audio_segment = self.pad_seq(audio, self.segment_length_up)
return encoder_segment, audio_segment

0 comments on commit 3b20220

Please sign in to comment.