mirror of https://github.com/coqui-ai/TTS.git
pylint
This commit is contained in:
parent
e1b3c41af5
commit
c637aa04a2
|
@ -399,8 +399,7 @@ class Decoder(nn.Module):
|
||||||
self.memory_input = torch.cat([
|
self.memory_input = torch.cat([
|
||||||
new_memory, self.memory_input[:, :(
|
new_memory, self.memory_input[:, :(
|
||||||
self.memory_size - self.r) * self.memory_dim].clone()
|
self.memory_size - self.r) * self.memory_dim].clone()
|
||||||
],
|
], dim=-1)
|
||||||
dim=-1)
|
|
||||||
else:
|
else:
|
||||||
# memory queue size smaller than number of frames per decoder iter
|
# memory queue size smaller than number of frames per decoder iter
|
||||||
self.memory_input = new_memory[:, :self.memory_size * self.memory_dim]
|
self.memory_input = new_memory[:, :self.memory_size * self.memory_dim]
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from utils.text import phonemes
|
from utils.text import phonemes
|
||||||
from collections import Counter
|
|
||||||
|
|
||||||
class SymbolsTest(unittest.TestCase):
|
class SymbolsTest(unittest.TestCase):
|
||||||
def test_uniqueness(self):
|
def test_uniqueness(self): #pylint: disable=no-self-use
|
||||||
assert sorted(phonemes) == sorted(list(set(phonemes))), " {} vs {} ".format(len(phonemes), len(set(phonemes)))
|
assert sorted(phonemes) == sorted(list(set(phonemes))), " {} vs {} ".format(len(phonemes), len(set(phonemes)))
|
||||||
|
|
|
@ -138,8 +138,8 @@ class TestTTSDataset(unittest.TestCase):
|
||||||
# there is a slight difference between two matrices.
|
# there is a slight difference between two matrices.
|
||||||
# TODO: Check this assert cond more in detail.
|
# TODO: Check this assert cond more in detail.
|
||||||
assert abs((abs(mel.T)
|
assert abs((abs(mel.T)
|
||||||
- abs(mel_dl[:-1])
|
- abs(mel_dl[:-1])
|
||||||
).sum()) < 1e-5, (abs(mel.T)- abs(mel_dl[:-1])).sum()
|
).sum()) < 1e-5, (abs(mel.T) - abs(mel_dl[:-1])).sum()
|
||||||
|
|
||||||
# check mel-spec correctness
|
# check mel-spec correctness
|
||||||
mel_spec = mel_input[0].cpu().numpy()
|
mel_spec = mel_input[0].cpu().numpy()
|
||||||
|
|
Loading…
Reference in New Issue