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

The score is very different depending on the random idx value #15

Open
dhkdnduq opened this issue Mar 21, 2021 · 1 comment
Open

The score is very different depending on the random idx value #15

dhkdnduq opened this issue Mar 21, 2021 · 1 comment

Comments

@dhkdnduq
Copy link

dhkdnduq commented Mar 21, 2021

//root code
Big difference between anomaly data and a normal data dist score
idx = torch.tensor(sample(range(0, t_d), d))

//my code
Little difference between anomaly data and a normal data dist score.
idx = torch.randint(0,t_d - 1,(d,))
or
idx = torch.range(t_d - d ,t_d - 1,1,dtype = torch.int64)

I don't understand this phenomenon.

-add

It is the magic of seed number 1024.
--code--
random.seed(1024)
torch.manual_seed(1024)

I still don't understand.
Why do random.seed(1024) make so many changes to dist score?

@manureini
Copy link

PaDiM is using random, but every time the same embedding vectors from the layers of resnet.
I'd say you can interpret the random seed as a hyperparameter. You can also store the selected indexes of these embedding vectors in the model

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