Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 1082bae0 authored by PaulWawerek-L's avatar PaulWawerek-L
Browse files

print patch id while testing

parent 0ae109ca
No related branches found
No related tags found
1 merge request!2OSLO-IC
...@@ -254,6 +254,7 @@ def test_epoch(test_dataloader, struct_loader, model, criterion, patch_res=None, ...@@ -254,6 +254,7 @@ def test_epoch(test_dataloader, struct_loader, model, criterion, patch_res=None,
diff = (out_net["x_hat"] - decompressed["x_hat"]).abs() diff = (out_net["x_hat"] - decompressed["x_hat"]).abs()
diff_in_bits = (theoretical_rates - actual_rates).abs() diff_in_bits = (theoretical_rates - actual_rates).abs()
print(f"Patch [{patch_id:03d}/{n_patches:03d}]")
print(f"max difference={diff.max()}, min difference={diff.min()}") print(f"max difference={diff.max()}, min difference={diff.min()}")
print(f"diff in bits={diff_in_bits}, ratio (compressed/training)={torch.div(actual_rates, theoretical_rates)}%", flush=True) print(f"diff in bits={diff_in_bits}, ratio (compressed/training)={torch.div(actual_rates, theoretical_rates)}%", flush=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment