Skip to content

Commit

Permalink
fix: txt_feats should repeat batch_size times
Browse files Browse the repository at this point in the history
  • Loading branch information
wufei-png committed May 18, 2024
1 parent 5c1e7b3 commit 416fc7e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yolo_world/models/detectors/yolo_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ def extract_feat(
if batch_data_samples is None:
texts = self.texts
txt_feats = self.text_feats
batch_size=batch_inputs.shape[0]
texts = texts * batch_size
txt_feats = txt_feats.repeat(batch_size, 1, 1)
elif isinstance(batch_data_samples,
dict) and 'texts' in batch_data_samples:
texts = batch_data_samples['texts']
Expand Down

0 comments on commit 416fc7e

Please sign in to comment.