Skip to content

Commit

Permalink
Reverted to standard cumsum for LR.
Browse files Browse the repository at this point in the history
  • Loading branch information
cschaefer26 committed Jul 6, 2020
1 parent 6aaeab2 commit be4a985
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions models/forward_tacotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ def __init__(self):
def forward(self, x, dur):
return self.expand(x, dur)

def build_index(self, duration, x):
@staticmethod
def build_index(duration, x):
duration[duration < 0] = 0
tot_duration = duration.cumsum(1).detach().cpu().numpy()
if not self.training:
tot_duration = tot_duration + 0.5
tot_duration = tot_duration.astype('int')
tot_duration = duration.cumsum(1).detach().cpu().numpy().astype('int')
max_duration = int(tot_duration.max().item())
index = np.zeros([x.shape[0], max_duration, x.shape[2]], dtype='long')

Expand Down

0 comments on commit be4a985

Please sign in to comment.