Skip to content

Commit

Permalink
fix typo when computing embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
aaprasad committed Apr 24, 2024
1 parent 79810d7 commit fc6813d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions biogtr/models/embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ def _learned_pos_embedding(self, boxes: torch.Tensor) -> torch.Tensor:
right_emb = pos_emb_table.gather(
0, right_ind[:, :, None].to(pos_emb_table.device).expand(N, 4, f)
) # N x 4 x d
pos_emb = left_weight[:, :, None] * left_emb.to(
pos_emb = left_weight[:, :, None] * right_emb.to(
left_weight.device
) + right_weight[:, :, None] * right_emb.to(right_weight.device)
) + right_weight[:, :, None] * left_emb.to(right_weight.device)

pos_emb = pos_emb.view(N, 4 * f)

Expand Down

0 comments on commit fc6813d

Please sign in to comment.