Skip to content

Commit

Permalink
fix dtype mismatch error
Browse files Browse the repository at this point in the history
  • Loading branch information
bminixhofer committed Jan 21, 2022
1 parent d9f0752 commit c985515
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wechsel/__init__.py
Expand Up @@ -240,7 +240,9 @@ def get_n_closest(token_id, similarities, top_k):

source_vocab = source_tokenizer.vocab

target_matrix = np.zeros((len(target_tokenizer), source_matrix.shape[1]))
target_matrix = np.zeros(
(len(target_tokenizer), source_matrix.shape[1]), dtype=source_matrix.dtype
)

mean, std = (
source_matrix.mean(0),
Expand Down

0 comments on commit c985515

Please sign in to comment.