# pm.Potential without Theano?

**URL:** <https://discourse.pymc.io/t/pm-potential-without-theano/968>\
**Category:** Questions\
**Created:** [March 18, 2018, 10:39am UTC](https://discourse.pymc.io/t/pm-potential-without-theano/968 "2018-03-18T10:39:35Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [March 18, 2018, 5:33pm UTC](https://discourse.pymc.io/t/pm-potential-without-theano/968/10 "2018-03-18T17:33:02Z")

</div>

Yes that’s what I meant - it is a way to check if the model is setup correctly

> [@Get nan or inf from model.logp (model.test point) is an attestation of incorrectly configured model?](https://discourse.pymc.io/t/get-nan-or-inf-from-model-logp-model-test-point-is-an-attestation-of-incorrectly-configured-model/111/11):
>
> A few thoughts: 1, In your model, the observed part you are doing: with model: ... mz = pm.Uniform("mz", lower=0, upper=1, observed=mz\_freq) M = pm.Binomial("M", n=Yp, p=mz, observed=loss\_shifte However, the node mz is not doing anything, since there is no prior on mz, in effect, this is equivalent to mz = mz\_freq 2, Since we got -inf from model.logp (model.logp(model.test\_point)), we want to identify which RV node is causing the problem. @aseyboldt suggest doing model.bijection.…

in this case, it means the evaluation of logp is still not correct. How about setting the input to theano tensor ivector?

```python
@as_op(itypes=[theano.tensor.dvector, theano.tensor.ivector],
       otypes=[theano.tensor.dscalar])
def likelihood(params, data):
    return me.model.getLogProbability(data).sum()

```

---

_[View the full topic](https://discourse.pymc.io/t/pm-potential-without-theano/968)._
