From 7c1d9965b0aca4128004a611f487b142de1577b4 Mon Sep 17 00:00:00 2001 From: TrAyZeN Date: Wed, 30 Oct 2024 17:30:33 +0100 Subject: [PATCH] Fix snr helper bug --- src/leakage_detection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/leakage_detection.rs b/src/leakage_detection.rs index 8773dac..e2c17d8 100644 --- a/src/leakage_detection.rs +++ b/src/leakage_detection.rs @@ -63,7 +63,7 @@ where || SnrProcessor::new(traces.shape()[1], classes), |mut snr, (batch_idx, trace_batch)| { for i in 0..trace_batch.shape()[0] { - snr.process(trace_batch.row(i), get_class(batch_idx + i)); + snr.process(trace_batch.row(i), get_class(batch_idx * batch_size + i)); } snr },