From 7f06f6e1851779383ce71839a6b64c1c0e6b75e4 Mon Sep 17 00:00:00 2001 From: Adria Arrufat Date: Tue, 1 Nov 2022 08:52:24 +0900 Subject: [PATCH] Fix empirical cross-correlation computation in the SSL example (#2679) I was using the normalized features za as both matrices, instead of za and zb. I noticed this because the empirical cross-correlation matrix was symmetrical, which is not supposed to. It does not affect anything, as it was computed properly in the loss. --- examples/dnn_self_supervised_learning_ex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dnn_self_supervised_learning_ex.cpp b/examples/dnn_self_supervised_learning_ex.cpp index eaecbc12f..c4e7db63a 100644 --- a/examples/dnn_self_supervised_learning_ex.cpp +++ b/examples/dnn_self_supervised_learning_ex.cpp @@ -283,7 +283,7 @@ try beta = 0; // Perform batch normalization on each feature representation, independently. tt::batch_normalize(eps, za_norm, means, invstds, 1, rms, rvs, za, gamma, beta); - tt::batch_normalize(eps, zb_norm, means, invstds, 1, rms, rvs, za, gamma, beta); + tt::batch_normalize(eps, zb_norm, means, invstds, 1, rms, rvs, zb, gamma, beta); // Compute the empirical cross-correlation matrix between the features and // visualize it. tt::gemm(0, eccm, 1, za_norm, true, zb_norm, false);