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

Seq2Seq(Attention)Input Shape Question #31

Open
dpyneo opened this issue Jul 21, 2019 · 4 comments
Open

Seq2Seq(Attention)Input Shape Question #31

dpyneo opened this issue Jul 21, 2019 · 4 comments

Comments

@dpyneo
Copy link

dpyneo commented Jul 21, 2019

Seq2Seq(Attention)\Seq2Seq(Attention)-Tensor.py

The shape of the input should be [max_time, batch_size,...]. The input = tf. transpose (dec_inputs, [1, 0, 2]) has already been transformed. In tf. expand_dims (inputs [i], 1), the expansion is indeed one dimension. It seems that there should be zero dimension expansion here. Although the final shape is correct, whether it is intentional or not is here. What about a little trick?

@dpyneo
Copy link
Author

dpyneo commented Jul 21, 2019

I would also like to ask if this is attention can be used for LSTM timing prediction. The main problem that bothers me is this n_class = len (word_dict). Can this be considered as a different feature of input? In the end, your project is very good. It has benefited a lot. It's very good. Thank you very much.

@dpyneo
Copy link
Author

dpyneo commented Jul 21, 2019

'S i want a beer', 'i want a beer E',Is this the last attention mechanism not aligned?

@searchlink
Copy link

searchlink commented Aug 22, 2019

Seq2Seq(Attention)\Seq2Seq(Attention)-Tensor.py

The shape of the input should be [max_time, batch_size,...]. The input = tf. transpose (dec_inputs, [1, 0, 2]) has already been transformed. In tf. expand_dims (inputs [i], 1), the expansion is indeed one dimension. It seems that there should be zero dimension expansion here. Although the final shape is correct, whether it is intentional or not is here. What about a little trick?

I have the same question. Do you solve it ?

Oh, I have solve it.You are right.However, batch_size=1,so it has no effect。

@cqray1990
Copy link

i think the code is only for batch)size=1,isn't is ?

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

4 participants
@searchlink @dpyneo @cqray1990 and others