Tacotron-2 icon indicating copy to clipboard operation
Tacotron-2 copied to clipboard

Type of sequence_length in BiLSTM

Open tuong-olli opened this issue 3 years ago • 0 comments

Hi, Could you help me something about your code? In tacotron.py in line encoder_outputs = encoder_cell(embedded_inputs, tower_input_lengths[i]). You add tower_input_lengths[i] (this is a tensor) to EncoderRNN (this is a BiLSTM) with code:

def __call__(self, inputs, input_lengths):
                with tf.variable_scope(self.scope):
                        outputs, (fw_state, bw_state) = tf.nn.bidirectional_dynamic_rnn(
                                self._fw_cell,
                                self._bw_cell,
                                inputs,
                                sequence_length=input_lengths,
                                dtype=tf.float32,
                                swap_memory=True)

So sequence_length have to int type not tensor, but how you can do with tower_input_lengths[i], this is a tensor.

tuong-olli avatar Apr 12 '21 08:04 tuong-olli