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

Question about coding choice: why are beta and alpha clamped? #346

Open
landoskape opened this issue Aug 10, 2024 · 0 comments
Open

Question about coding choice: why are beta and alpha clamped? #346

landoskape opened this issue Aug 10, 2024 · 0 comments

Comments

@landoskape
Copy link

This isn't a bug - just a scientific / implementation question.

In the Leaky and Synaptic class (and probably other places), alpha and beta are constrained to be between 0 and 1 by torch.clamp(beta, 0, 1). This means that they both could grow outside the range from learning (or by the user setting a higher value without realizing), but that value won't actually be used.

Any reason not to use torch.sigmoid() as a wrapper on beta so it can have values from $-\infty$ to $\infty$?

This would make reading out self.beta less informative, but of course you could just write:

def get_beta(self):
    return torch.sigmoid(self.beta)
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