# Implementing new Models (Distributions)

**URL:** <https://discourse.edwardlib.org/t/implementing-new-models-distributions/326>\
**Category:** General\
**Created:** [August 29, 2017, 1:28pm UTC](https://discourse.edwardlib.org/t/implementing-new-models-distributions/326 "2017-08-29T13:28:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cshenton](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.edwardlib.org/cshenton/32/99_2.png) [@cshenton](https://discourse.edwardlib.org/u/cshenton)\
**Post date:** [August 29, 2017, 1:28pm UTC](https://discourse.edwardlib.org/t/implementing-new-models-distributions/326/1 "2017-08-29T13:28:41Z")

</div>

I need to implement some distributions (such as a gaussian walk, or in general an AR1 distribution) that aren’t available in edward (or tensorflow). In general, these are probability distributions over variable length 1-d tensors (strictly speaking they are stochastic processes, but programmatically it’s useful to reason about them as distributions like any other).

Is the recommended course of action to subclass `tf.contrib.distributions.Distribution` in my own code, then to use a similar method as the edward source to auto generate a `RandomVariable` subclass?

---

<div class="post-metadata">

**Author:** ![cshenton](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.edwardlib.org/cshenton/32/99_2.png) [@cshenton](https://discourse.edwardlib.org/u/cshenton)\
**Post date:** [August 29, 2017, 1:43pm UTC](https://discourse.edwardlib.org/t/implementing-new-models-distributions/326/2 "2017-08-29T13:43:32Z")

</div>

Apologies, missed [this page in the docs](http://edwardlib.org/api/model-development)
