frame_positions = np.array(
[_pad(np.arange(1, len(x[1]) // r + 1), max_target_len // r)
for x in batch], dtype=np.int)
frame_positions = torch.LongTensor(frame_positions)
else:
s, e = 1, max_target_len // r + 1
if b_pad > 0:
s, e = s - 1, e - 1
After Change
// done flags
done = np.array([_pad(np.zeros(len(x[1]) // r - 1), max_target_len // r, constant_values=1)
for x in batch])
done = torch.FloatTensor(done)
return x_batch, input_lengths, mel_batch, y_batch, (text_positions, frame_positions), done