anomaly_transformer_pytorch icon indicating copy to clipboard operation
anomaly_transformer_pytorch copied to clipboard

Incorrect prior_association() ?

Open sappersapper opened this issue 2 years ago • 4 comments

It seems the method prior_association() can not back propagate gradient to train Ws, or maybe I misunderstood? https://github.com/spencerbraun/anomaly_transformer_pytorch/blob/6d15200911260eee910a3664d70f07886c47708b/model.py#L41-L45

according to paper, is this the right way? gaussian = 1 / math.sqrt(2 * math.pi) / self.sigma * torch.exp(- 0.5 * (p / self.sigma).pow(2))

sappersapper avatar Mar 22 '22 01:03 sappersapper

Yes, I found the same problem. gaussian = 1 / math.sqrt(2 * math.pi) / self.sigma * torch.exp(- 0.5 * (p / self.sigma).pow(2)).And I emailed the author about it.

hancan0 avatar Mar 24 '22 08:03 hancan0

Does the self.sigma need to be constrained positive? How to constrain it?

sappersapper avatar Mar 25 '22 02:03 sappersapper

Yes, I found the same problem. gaussian = 1 / math.sqrt(2 * math.pi) / self.sigma * torch.exp(- 0.5 * (p / self.sigma).pow(2)).And I emailed the author about it.

I also encountered the same problem, did the author reply to you?

DanyaXu avatar Apr 18 '22 07:04 DanyaXu

Yes, I found the same problem. gaussian = 1 / math.sqrt(2 * math.pi) / self.sigma * torch.exp(- 0.5 * (p / self.sigma).pow(2)).And I emailed the author about it.

I also encountered the same problem, did the author reply to you?

Yes, The author agrees it.

hancan0 avatar Apr 18 '22 12:04 hancan0