Couple of things here:
-
RV.logpaccept a dictionary as input, the dictionary should have the same structure asmodel.test_point(keyand usually shape) - The vector
pis not normalized - it should be constrained to sum to 1 - The output of the categorical should be 1 dimension less than the parameter
p, not sure if it is intensional that x has the same shape as p here but you should be careful about that.