mirror of https://github.com/davisking/dlib.git
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.
This commit is contained in:
parent
1bebccfb87
commit
7f06f6e185
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue