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

Constraining the output interval of the GaussianLSTMModel to [0.0 .. 1.0] #2324

Open
glisca opened this issue Apr 22, 2022 · 1 comment
Open

Comments

@glisca
Copy link

glisca commented Apr 22, 2022

What would be the simplest way to constrain the GaussianLSTMModel [1] to output values only within the interval [0.0 .. 1.0]?

[1]

class GaussianLSTMModel(Model):

Many thanks in advance!

@krzentner
Copy link
Contributor

krzentner commented Apr 27, 2022

I don't believe this is possible with the current API, but it is not difficult to implement.
My recommendation is to copy gaussian_lstm_model.py into your project's source, and modify line 260 to wrap a TransformedDistribution with a Sigmoid, around dist.

A PR implementing this (gated by a flag) would of course also be welcome.

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

2 participants