Skip to content

Commit

Permalink
Fix for compatible with numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodore Zhao committed Nov 7, 2024
1 parent b24a7c5 commit 4cb6326
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modeling/architectures/seem_model_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def prepare_targets(self, batched_inputs, images):
tokens = gtext['tokens']

unique_hash_id = np.unique(grd_hash, return_index=True)[1]
selected_mask = np.zeros(len(grd_hash)).astype(np.bool)
selected_mask = np.zeros(len(grd_hash)).astype(bool)
selected_mask[unique_hash_id] = True

selected_token_emb = token_emb[selected_mask]
Expand Down
2 changes: 1 addition & 1 deletion modeling/architectures/seem_model_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ def prepare_targets(self, batched_inputs, images):
tokens = gtext['tokens']

unique_hash_id = np.unique(grd_hash, return_index=True)[1]
selected_mask = np.zeros(len(grd_hash)).astype(np.bool)
selected_mask = np.zeros(len(grd_hash)).astype(bool)
selected_mask[unique_hash_id] = True

selected_token_emb = token_emb[selected_mask]
Expand Down

0 comments on commit 4cb6326

Please sign in to comment.