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

predprob = float(expit(torch.mean(logit(subseq)))) #7

Open
igortru opened this issue Sep 17, 2021 · 0 comments
Open

predprob = float(expit(torch.mean(logit(subseq)))) #7

igortru opened this issue Sep 17, 2021 · 0 comments

Comments

@igortru
Copy link

igortru commented Sep 17, 2021

Hello,Markus!
I see minor issue with logit, if subseq contain 0.0, logit return -inf , if subseq contain 1.0 logit return inf,
as result mean will be corresponding inf
and expit automatically return 0.0 or 1.0
is it intentional? one 0.0 or 1.0 make "mean" useless,

torch.logit has additional attribute eps which allow exclude such situations.

https://pytorch.org/docs/stable/special.html#torch.special.logit

what do you think?

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

1 participant