Skip to content

Scaling in time embedding in Lab Three #30

Description

@qwdong

In the end, we put cos and sin into a sequence:

Step 3: Concatenate and return

    return torch.cat([sin_embed, cos_embed], dim=-1) * math.sqrt(2) # b d

In the lecture notes, we have the following equation, is this wrong?

Image

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