Custom random variable with two parts


I need to write a custom random variable but it has two arrays in its outcome, not just a single number. Does the Edward customrandomvariable _log_prob(self, value) allow for that? Do I simply set value to be an tensorflow array (tensor)? How exactly would you declare that when you use the “value” variable? (maybe this is just a python or tensorflow question, but I don’t know how)?

In fact I am wondering even if it’s just a single array (or a vector) outcome, I don’t see any sample code that can handle this. How would you optimize the elbo in this case? is it automatically handled once you enter the right shape tensor?

Another question when I implemented this in stan, I only have to generate log prob, no need for samples. Why does Edward require generation of samples?