Skip to content

Confusion about the batch in model.py(I think batch should be the second dimension.) #15

Description

@WenXiuxiu

I read the code very carefully.
I am confused about the 65th line of model.py.
I think the second dimension of "hidden" is batch, not the first one.
Even though the encoder have been set with "batch_first=True”, the output will be have "batch" in the first dimension, but the hidden state is not.
I have test this on my own computer.

Of course, the code can run without problems. I just feel confused since the two dimensions are mixed up in the code.
Is there any one can help me with it?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions