Skip to content

Issues about Positional Embedding and Reference Point #32

Description

@tae-mo

Hi, thanks for sharing your wonderful work.

I got a question in here,

def gen_sineembed_for_position(pos_tensor):

which embedes positional information in the query_pos.

however, I don't understand the reason why does 2*(dim_t//2) has to be devided by 128, instead of the actual dimension pos_tensor has (e.g., 256 by default).

dim_t = 10000 ** (2 * (dim_t // 2) / 128)

Is it works correctly even dim_t is divided by 128?

I would appreciate to be corrected !

And another question is,
when we do the calculation of the equation (1) in the paper,

tmp[..., :2] += reference_before_sigmoid

can I understand that the model would learn "offsets" from the corresponding reference points?
what is precise role of the reference points?

Thank you!

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions