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

Incorrect prior_association() ? #5

Open
sappersapper opened this issue Mar 22, 2022 · 4 comments
Open

Incorrect prior_association() ? #5

sappersapper opened this issue Mar 22, 2022 · 4 comments

Comments

@sappersapper
Copy link

It seems the method prior_association() can not back propagate gradient to train Ws, or maybe I misunderstood?

def prior_association(self):
p = torch.from_numpy(
np.abs(np.indices((self.N, self.N))[0] - np.indices((self.N, self.N))[1])
)
gaussian = torch.normal(p.float(), self.sigma[:, 0].abs())

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
Copy link
Author

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

@DanyaXu
Copy link

DanyaXu commented Apr 18, 2022

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?

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

3 participants
@DanyaXu @sappersapper and others