I’m confused with various shape parameters in Edward, sample_shape, batch_shape, and event_shape.
Would appreciate some clarification from experts!
Say I create a Dirichlet object:
import tensorflow as tf
from edward.models import Dirichlet
x = Dirichlet([1.0, 2.0, 3.0], sample_shape=(7, 4))
One draw from the object should be a vector of length 3, which should correspond to event_shape.
So:
x.event_shape
# TensorShape([Dimension(3)])
with tf.Session() as sess:
print(sess.run(x.sample()))
# [ 0.07021441 0.43511733 0.49466828]
# This makes sense so far.
But, how do I understand sample_shape and batch_shape?
The sample_shape parameter specified when x is constructed doesn’t seem to have any effect.
Thank you!