add tqdm ncol in test and stat
This commit is contained in:
parent
3d48dbdd17
commit
5d09516151
@ -77,7 +77,7 @@ def process_autofocus_results(input_file, dataset_type, group_size=30):
|
|||||||
|
|
||||||
print_with_timestamp(f"开始处理数据,共{total_rows}行,{n_groups}个完整分组")
|
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
|
start_idx = group_idx * group_size
|
||||||
end_idx = (group_idx + 1) * group_size
|
end_idx = (group_idx + 1) * group_size
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ def test(model, test_loader, device, model_type, dataset_type):
|
|||||||
results = []
|
results = []
|
||||||
|
|
||||||
with torch.no_grad():
|
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)
|
images = data["image"].to(device, non_blocking=True)
|
||||||
params = torch.stack((data["mag"], data["na"], data["rix"]), dim=1).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)
|
outputs = model(images, params)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user