Skip to content

Bug after #2171 #2298

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

Closed
junpenglao opened this issue Jun 12, 2017 · 1 comment
Closed

Bug after #2171 #2298

junpenglao opened this issue Jun 12, 2017 · 1 comment
Assignees
Milestone

Comments

@junpenglao
Copy link
Member

@ferrine
running examples/arbitrary_stochastic.py returns error after #2171:

Traceback (most recent call last):

  File "<ipython-input-7-612e002ded9a>", line 2, in <module>
    trace = pm.sample(n_samples)

  File "/usr/local/lib/python3.5/dist-packages/pymc3/sampling.py", line 240, in sample
    progressbar=progressbar, **args)

  File "/usr/local/lib/python3.5/dist-packages/pymc3/sampling.py", line 597, in init_nuts
    obj_optimizer=pm.adagrad_window

  File "/usr/local/lib/python3.5/dist-packages/pymc3/variational/inference.py", line 755, in fit
    return inference.fit(n, **kwargs)

  File "/usr/local/lib/python3.5/dist-packages/pymc3/variational/inference.py", line 123, in fit
    step_func = self.objective.step_function(score=score, **kwargs)

  File "/usr/local/lib/python3.5/dist-packages/pymc3/memoize.py", line 16, in memoizer
    cache[key] = obj(*args, **kwargs)

  File "/usr/local/lib/python3.5/dist-packages/theano/configparser.py", line 117, in res
    return f(*args, **kwargs)

  File "/usr/local/lib/python3.5/dist-packages/pymc3/variational/opvi.py", line 258, in step_function
    total_grad_norm_constraint=total_grad_norm_constraint)

  File "/usr/local/lib/python3.5/dist-packages/pymc3/variational/opvi.py", line 154, in updates
    total_grad_norm_constraint=total_grad_norm_constraint

  File "/usr/local/lib/python3.5/dist-packages/pymc3/variational/opvi.py", line 186, in add_obj_updates
    obj_target = self(obj_z, more_obj_params=more_obj_params)

  File "/usr/local/lib/python3.5/dist-packages/pymc3/variational/opvi.py", line 315, in __call__
    self.op.apply(self.tf),

  File "/usr/local/lib/python3.5/dist-packages/pymc3/variational/operators.py", line 24, in apply
    return self.logq_norm(z) - self.logp_norm(z)

  File "/usr/local/lib/python3.5/dist-packages/pymc3/variational/opvi.py", line 958, in logq_norm
    return self.logq(z) / self.normalizing_constant

  File "/usr/local/lib/python3.5/dist-packages/pymc3/variational/opvi.py", line 598, in normalizing_constant
    tt.max([v.scaling for v in self.model.basic_RVs]))

  File "/usr/local/lib/python3.5/dist-packages/pymc3/variational/opvi.py", line 598, in <listcomp>
    tt.max([v.scaling for v in self.model.basic_RVs]))

AttributeError: 'MultiObservedRV' object has no attribute 'scaling'
@twiecki twiecki added this to the 3.1 milestone Jun 12, 2017
@junpenglao
Copy link
Member Author

junpenglao pushed a commit that referenced this issue Jun 12, 2017
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

3 participants