Skip to content

Issues about Positional Embedding and Reference Point #32

@tae-mo

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!

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