mirror of
https://github.com/wassname/TTS.git
synced 2026-09-11 12:00:24 +08:00
updates and debugs
This commit is contained in:
+2
-3
@@ -14,9 +14,8 @@ def prepare_data(inputs):
|
||||
return np.stack([pad_data(x, max_len) for x in inputs])
|
||||
|
||||
|
||||
def pad_per_step(inputs, outputs_per_step):
|
||||
"""zero pad inputs if it is not divisible with outputs_per_step (r)"""
|
||||
def pad_per_step(inputs, pad_len):
|
||||
timesteps = inputs.shape[-1]
|
||||
return np.pad(inputs, [[0, 0], [0, 0],
|
||||
[0, outputs_per_step - (timesteps % outputs_per_step)]],
|
||||
[0, pad_len]],
|
||||
mode='constant', constant_values=0.0)
|
||||
|
||||
Reference in New Issue
Block a user