Skip to content

Commit

Permalink
Update rc_position_embedding.py
Browse files Browse the repository at this point in the history
Thanks @King-Hell for pointing out a bug. We now fix it.
  • Loading branch information
tata1661 authored May 30, 2022
1 parent b8f9bb5 commit 7249e68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PaddleFSL/paddlefsl/backbones/rc_position_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def forward(self, rc_vector):
if rc_vector.shape[-1] != self.embedding_dim + 2:
raise ValueError('Embedding dimension not match. Please check whether'
'embedding_dimension + 2 == rc_vector.shape[-1]')
head_position_vector = paddle.to_tensor(rc_vector[:, :, -1], dtype='int64')
head_position_vector = paddle.to_tensor(rc_vector[:, :, -2], dtype='int64')
head_embedding = self.head_position_embedding(head_position_vector)
tail_position_vector = paddle.to_tensor(rc_vector[:, :, -1], dtype='int64')
tail_embedding = self.head_position_embedding(tail_position_vector)
Expand Down

0 comments on commit 7249e68

Please sign in to comment.