# A toy normal model failed (klqp) and why?

**URL:** <https://discourse.edwardlib.org/t/a-toy-normal-model-failed-klqp-and-why/253>\
**Category:** General\
**Created:** [July 23, 2017, 11:53pm UTC](https://discourse.edwardlib.org/t/a-toy-normal-model-failed-klqp-and-why/253 "2017-07-23T23:53:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![deoxyribose](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.edwardlib.org/deoxyribose/32/237_2.png) [@deoxyribose](https://discourse.edwardlib.org/u/deoxyribose)\
**Post date:** [July 24, 2017, 10:07am UTC](https://discourse.edwardlib.org/t/a-toy-normal-model-failed-klqp-and-why/253/2 "2017-07-24T10:07:57Z")

</div>

Hi,

(1) I don’t see anything wrong per se  
(2) In my experience, KLqp has trouble with the inv-gamma distribution, though I don’t know why. My guess is that the gamma function is somehow tough to differentiate.  
If it suits your purposes, use the log-normal distribution in the variational model, see link below.  
(3) Instead of calling run, you can initialize, and run updates yourself: see [notebook](https://github.com/deoxyribose/auml/blob/master/edward-categorical/toy%20normal%20with%20lognormal%20sigma.ipynb)

Hope that helps 🙂

---

_[View the full topic](https://discourse.edwardlib.org/t/a-toy-normal-model-failed-klqp-and-why/253)._
