hello,
I am confused about the generation process of 'kernel_code'.
When calculating the PCA matrix, the code do 'X = X - X_mean.expand_as(X)' before get the PCA matrix.
Then, in 'PCAEncoder', It seems direct projection by 'torch.bmm(
batch_kernel.view((B, 1, H * W)), self.weight.expand((B,) + self.size)
).view((B, -1))' without '- X_mean'.
Did we need '- X_mean'?
Sorry, I have misunderstood your question. We only need ' - X_mean' when we create the PCA matrix. While when we use this PCA matrix to encode other kernels, we do not need to zero their mean values.
hello, I am confused about the generation process of 'kernel_code'. When calculating the PCA matrix, the code do 'X = X - X_mean.expand_as(X)' before get the PCA matrix. Then, in 'PCAEncoder', It seems direct projection by 'torch.bmm( batch_kernel.view((B, 1, H * W)), self.weight.expand((B,) + self.size) ).view((B, -1))' without '- X_mean'. Did we need '- X_mean'?
Thank you!