Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type of sequence_length in BiLSTM #508

Open
tuong-olli opened this issue Apr 12, 2021 · 0 comments
Open

Type of sequence_length in BiLSTM #508

tuong-olli opened this issue Apr 12, 2021 · 0 comments

Comments

@tuong-olli
Copy link

tuong-olli commented Apr 12, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant