import pymc3 as pm3
import numpy as np
import theano
import theano.tensor as tt
arr_y = np.ones(shape=(3, 3, 3))*1/3
arr_ys = theano.shared(arr_y)
# define model
basic_model = pm3.Model()
with basic_model:
a = pm3.Categorical('a', p=np.array([0.25, .30, .45]), observed = np.array([0, 0]))
b = pm3.Categorical('b', p=np.array([0.6, .3, .1]))
y = pm3.Categorical('y', p=tt.squeeze(arr_ys[a, b, :]))
# sample
with basic_model:
trace = pm3.sample(100)
# plot
pm3.traceplot(trace,figsize=(20,5));
The above model in PyMC3/Theano works fine. How would I translate it to Edward/Tensorflow