add tqdm ncol in test and stat

This commit is contained in:
kaiza_hikaru 2025-11-03 10:35:01 +08:00
parent 3d48dbdd17
commit 5d09516151
2 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ def process_autofocus_results(input_file, dataset_type, group_size=30):
print_with_timestamp(f"开始处理数据,共{total_rows}行,{n_groups}个完整分组")
for group_idx in trange(n_groups):
for group_idx in trange(n_groups, ncols=180):
start_idx = group_idx * group_size
end_idx = (group_idx + 1) * group_size

View File

@ -17,7 +17,7 @@ def test(model, test_loader, device, model_type, dataset_type):
results = []
with torch.no_grad():
for data in tqdm(test_loader, desc=f"[Test]"):
for data in tqdm(test_loader, desc=f"[Test]", ncols=180):
images = data["image"].to(device, non_blocking=True)
params = torch.stack((data["mag"], data["na"], data["rix"]), dim=1).to(device, non_blocking=True)
outputs = model(images, params)