Open Pindar777 opened 5 years ago
For N>1
Replace the last three lines of code with:
likelihood_x_ = evaluate(tfd.Poisson(rate=x_).prob(data_[:, 0][:, np.newaxis]))
likelihood_y_ = evaluate(tfd.Poisson(rate=y_).prob(data_[:, 1][:, np.newaxis]))
L_ = evaluate(tf.matmul((likelihood_x_.T), (likelihood_y_)))
It'll work.
Hi there, when trying to run the code with N>1 (introduction of part 3) these lines are not executed
likelihood_x_ = evaluate(tfd.Poisson(rate=x_).prob(data_[:, 0])) likelihood_y_ = evaluate(tfd.Poisson(rate=y_).prob(data_[:, 1]))
Error message: ValueError: Dimensions must be equal, but are 10 and 100 for 'Poisson_20/prob/mul' (op: 'Mul') with input shapes: [10], [100].