Skip to content

fixes when elbo is positive #2092

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

Merged
merged 1 commit into from
Apr 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pymc3/variational/opvi.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def __call__(self, z):
sequences=z, n_steps=z.shape[0])[0].mean()
else:
a = theano.clone(self.op.apply(self.tf), {self.op.input: z}, strict=False)
return tt.abs_(a)
return self.op.T(a)


class Operator(object):
Expand All @@ -291,6 +291,7 @@ class Operator(object):
RETURNS_LOSS = True
SUPPORT_AEVB = True
OBJECTIVE = ObjectiveFunction
T = pm.theanof.identity

def __init__(self, approx):
if not self.SUPPORT_AEVB and approx.local_vars:
Expand Down Expand Up @@ -334,9 +335,9 @@ def apply(self, f): # pragma: no cover

Parameters
----------
f : function or None
f : TestFunction or None if not required
function that takes `z = self.input` and returns
same dimension output
same dimensional output

Returns
-------
Expand Down