We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/exiawsh/StreamPETR/blob/main/projects/mmdet3d_plugin/models/utils/positional_encoding.py#L25
Is there any special design to transpose 'x' & 'y' dimentions ?
def pos2posemb3d(pos, num_pos_feats=128, temperature=10000): scale = 2 * math.pi dim_t = torch.arange(num_pos_feats//2, dtype=torch.float32, device=pos.device) dim_t = temperature ** (2 * dim_t / num_pos_feats) pos_x = pos[..., 0, None]* scale / dim_t pos_y = pos[..., 1, None]* scale / dim_t pos_z = pos[..., 2, None]* scale / dim_t pos_x = torch.stack((pos_x.sin(), pos_x.cos()), dim=-1).flatten(-2) pos_y = torch.stack((pos_y.sin(), pos_y.cos()), dim=-1).flatten(-2) pos_z = torch.stack((pos_z.sin(), pos_z.cos()), dim=-1).flatten(-2) posemb = torch.cat((pos_y, pos_x, pos_z), dim=-1) return posemb
The text was updated successfully, but these errors were encountered:
The same question consultation, here seems to be written backwards, anyone clear?
Sorry, something went wrong.
No branches or pull requests
https://github.com/exiawsh/StreamPETR/blob/main/projects/mmdet3d_plugin/models/utils/positional_encoding.py#L25
Is there any special design to transpose 'x' & 'y' dimentions ?
The text was updated successfully, but these errors were encountered: