PaDiM-Anomaly-Detection-Localization-master
PaDiM-Anomaly-Detection-Localization-master copied to clipboard
The score is very different depending on the random idx value
trafficstars
//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?
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