Hi, I am wondering how I can constrain a set of variables to sum to 0?
I am currently trying:
a = pyro.sample(“a”, dist.Normal(0, 1).expand().to_event(1))
a -= a.mean()
However, this produces the error on the 2nd line:
“a leaf Variable that requires grad has been used in an in-place operation”
I have also tried using plate, and a variety of other options to no avail.
Is this possible in Pyro? My apologies for what may be a trivial question.