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

How is the picture processed in sequence_generate? #21

Open
xiaoxiaokuye opened this issue Nov 6, 2020 · 1 comment
Open

How is the picture processed in sequence_generate? #21

xiaoxiaokuye opened this issue Nov 6, 2020 · 1 comment
Labels
question Further information is requested

Comments

@xiaoxiaokuye
Copy link

The shape of the picture is (Batch, Channel, H, W)
The data shape that the sequence_generate can receive is (batch, seq_len,...)
I did not find a solution in your code, how did you deal with this problem?
Thank you

@zhiqwang
Copy link
Owner

zhiqwang commented Nov 6, 2020

Hi @xiaoxiaokuye , I haven't followed this code for a while. I guess this is done in

x = x.permute(3, 0, 1, 2).view(x.size(3), x.size(0), -1) # seq_len x bsz x embed_dim

@zhiqwang zhiqwang added the question Further information is requested label Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants