mirror of
https://github.com/wassname/TTS.git
synced 2026-09-12 12:11:47 +08:00
change the bitwise for masking and small fixes
This commit is contained in:
@@ -234,7 +234,7 @@ class Attention(nn.Module):
|
||||
query, processed_inputs)
|
||||
# apply masking
|
||||
if mask is not None:
|
||||
attention.data.masked_fill_(torch.bitwise_not(mask), self._mask_value)
|
||||
attention.data.masked_fill_(~mask, self._mask_value)
|
||||
# apply windowing - only in eval mode
|
||||
if not self.training and self.windowing:
|
||||
attention = self.apply_windowing(attention, inputs)
|
||||
|
||||
+1
-1
@@ -315,7 +315,7 @@ class Decoder(nn.Module):
|
||||
# learn init values instead of zero init.
|
||||
self.stopnet = StopNet(256 + memory_dim * self.r_init)
|
||||
|
||||
def _set_r(self, new_r):
|
||||
def set_r(self, new_r):
|
||||
self.r = new_r
|
||||
|
||||
def _reshape_memory(self, memory):
|
||||
|
||||
Reference in New Issue
Block a user