garage
garage copied to clipboard
Constraining the output interval of the GaussianLSTMModel to [0.0 .. 1.0]
What would be the simplest way to constrain the GaussianLSTMModel [1] to output values only within the interval [0.0 .. 1.0]?
[1] https://github.com/rlworkgroup/garage/blob/6461a071f0155712add1b41316003e90c9c77899/src/garage/tf/models/gaussian_lstm_model.py#L16
Many thanks in advance!
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.