Commit 0c804556 authored by lucas_miranda's avatar lucas_miranda
Browse files

Changed full model for diagonal model in all variational implementations in

parent 52f4351f
......@@ -125,13 +125,13 @@ class MultivariateNormalDiag(tfpl.DistributionLambda):
def new(params, event_size, validate_args=False, name=None):
def new(params, event_size, epsilon=1e-8, validate_args=False, name=None):
"""Create the distribution instance from a `params` vector."""
with tf.name_scope(name or "MultivariateNormalDiag"):
params = tf.convert_to_tensor(params, name="params")
return tfd.mvn_diag.MultivariateNormalDiag(
loc=params[..., :event_size],
scale_diag=params[..., event_size:],
scale_diag=params[..., event_size:]+epsilon,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment