Skip to content
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

How to prevent NAN influence values? #27

Closed
ajsanjoaquin opened this issue May 27, 2021 · 3 comments
Closed

How to prevent NAN influence values? #27

ajsanjoaquin opened this issue May 27, 2021 · 3 comments

Comments

@ajsanjoaquin
Copy link

I am consistently getting NAN values in my output on CIFAR-10 data for recursion depths (r-depth) as low as 15. I noticed that the influence values for r-depth = 1 are big negative values (e.x. -2000) and they just explode to -1e36 for r-depth = 10.
I increased the scale value to 500 as suggested in #6, but to no avail. I have also used the default r-depth = 5000. I am using the function calc_influence_single. The averaging value (r) is 1 for all of these as suggested by #2.

Does anyone have advice or solution to this? Thank you.

@fjzpcmj
Copy link

fjzpcmj commented Jul 30, 2021

@ajsanjoaquin hello,do you solve nan problem? and how to solve it? I met this problem too.

@ajsanjoaquin
Copy link
Author

@fjzpcmj Yes my current fork works for this.

Here's my config file. Feel free to edit. Recursion depth and r_averaging are based on a post in the issues section, but I'm forgetting which. This works for CIFAR-10. Also, do not worry about the est_norm being very big or small during calculation.

config = {
        'outdir': <OUTPUT_DIR>,
        'seed': 42,
        'gpu': 0,
        'num_classes': 10,
        'test_sample_num': False,
        'test_start_index': 0,
        'recursion_depth': 5,
        'r_averaging': 10,
        'scale':50000,
        'damp': 0.01,
        'calc_method': 'img_wise'
    }

@fjzpcmj
Copy link

fjzpcmj commented Aug 1, 2021

@ajsanjoaquin Thanks for reply. Since your new fork modify original code much, DO you remember which part can fix the 'nan problem'. I read the all issues, in the #6 , i found the scale should be large. issue#6. Is the scale most important to fix the nan problem?

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

No branches or pull requests

2 participants