-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question on calculating square root of the FIM #85
Comments
Hello,
I am not so sure what you want to achieve, you mean to sqrt every component
of the vector and return a new PVector ? How do you deal with negative
reals, with complex numbers ?
Best,
Thomas
…On Mon, Sep 30, 2024 at 9:32 AM Massimiliano Falzari < ***@***.***> wrote:
I am currently writing a method to perform forgetting in RL. To do so I
add to the model some noise based on the FIM.
A snippet for such an approach is:
def calculate_scrub_noise(self):
gaus_noise = obj.vector.random_pvector(
lc.LayerCollection.from_model(self.model), device=self.device
)
inv = self.FIM.inverse().mv(gaus_noise)
return self.scrub_scale * inv
However, I would like to take the square root of the $F^{-1}*noise$ .
So i would like to implement the following formula:
$(scale*F^{-1}*noise)^{1/2}$
What would be the best way to implement it within your library?
Side Note: Great library! compared to other options I found your library
to be the most mathematically accurate for the FIM !
Thanks for the response
—
Reply to this email directly, view it on GitHub
<#85>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALTMWISZWSATHE3W6QI423ZZD5ALAVCNFSM6AAAAABPCUTY42VHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2TKOBRHAYTMNI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks for the fast reply! Best |
This PR #87 should work using EKFAC matrices.
In the case of KFAC, I am not sure what to implement since KFAC was only defined for computing the inverse in the paper. There is some weird side effect of the effect of the diagonal regularizer added before computing the inverse in KFAC. I also added a |
I made an error in the previous message, I do indeed use the EKFAC, not the KFAC. Sorry for the inconvenience. |
I am currently writing a method to perform forgetting in RL. To do so I add to the model some noise based on the FIM.
A snippet for such an approach is:
However, I would like to take the square root of the$F^{-1}*noise$ .$(scale*F^{-1}*noise)^{1/2}$
So i would like to implement the following formula:
What would be the best way to implement it within your library?
Side Note: Great library! compared to other options I found your library to be the most mathematically accurate for the FIM !
Thanks for the response
The text was updated successfully, but these errors were encountered: