def transform(self, item): batch = load_inputs_and_targets(item, True, self.use_speaker_embedding) # added eos into input sequence eos = int(item[0][1]['output'][0]['shape'][1]) - 1 xs = [np.append(x, eos) for x in batch[1]] if self.use_speaker_embedding: return batch[0], xs, batch[2] else: return batch[0], xs
def transform(self, item): return load_inputs_and_targets(item)