rlworkgroup / garage

A toolkit for reproducible reinforcement learning research.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

glisca opened this issue · comments

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!

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.