Skip to content

In h3, we should pass batch_first=True to TransformerEncoderLayer #5

Open
@junjiechen-chris

Description

@junjiechen-chris

As described in the title.
Torch by default uses batch_first=False for the TransformerEncoderLayer, resulting in high training loss and test error.

Using default batch_first=False
Image
Image

Passing batch_first=True
Image
Image

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