fix(retrieval): remove max_iter in retrieval.py to avoid empty data

pull/2579/head^2
HydrogenSulfate 2023-01-05 16:50:29 +08:00 committed by Walter
parent 62c9d0f45d
commit b05c8b1b7e
1 changed files with 0 additions and 4 deletions

View File

@ -125,12 +125,8 @@ def compute_feature(engine, name="gallery"):
all_feat = []
all_label = []
all_camera = []
max_iter = len(dataloader) - 1 if platform.system() == "Windows" else len(
dataloader)
has_camera = False
for idx, batch in enumerate(dataloader): # load is very time-consuming
if idx >= max_iter:
break
if idx % engine.config["Global"]["print_batch_step"] == 0:
logger.info(
f"{name} feature calculation process: [{idx}/{len(dataloader)}]"