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

pull/2588/head
HydrogenSulfate 2023-01-05 18:46:49 +08:00 committed by Walter
parent 0c6749b766
commit f54f03ac83
1 changed files with 0 additions and 4 deletions

View File

@ -146,11 +146,7 @@ def cal_feature(engine, name='gallery'):
batch_feas_list = []
img_id_list = []
unique_id_list = []
max_iter = len(dataloader) - 1 if platform.system() == "Windows" else len(
dataloader)
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)}]"