Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

A not obvious but important bug about fc-hyper-net(ffcc with meta) #15

Open
zhujl3 opened this issue Jul 24, 2021 · 1 comment
Open

Comments

@zhujl3
Copy link

zhujl3 commented Jul 24, 2021

When I reviewed the code in internal/TrainModel.m, line 283 ~ 288, the original codes are as below:

if params.DEEP.WHITEN_FEATURES
      % Unwhiten the first layer according to the whitening transformation, so
      % that is produces the correct output on the unwhitened feature vectors.
      model.W{1} = model.W{1} * whitening_transformation.A;
      model.b{1} = model.W{1} * whitening_transformation.b + model.b{1};
end

Since model.W{1} changed before model.b{1} it will lead a computational mistake to model.b{1}.And this mistake may weaken the model performance.
So I simply change the code order as below:

      model.b{1} = model.W{1} * whitening_transformation.b + model.b{1};
      model.W{1} = model.W{1} * whitening_transformation.A;

And after this change, I got a significant improvement in my experiment.^.^

@jonbarron
Copy link
Contributor

Wow, thanks for identifying this! Definitely a very important bug. Are you able to re-run the fixed code on any of the existing benchmarks (Gehler Shi or Cheng)? Updating the error metric structs in the *Hyperparams.m files under /projects/ with this bug fix would be very helpful for everyone using this code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants