I have a matrix of test probability distributions:
qs = np.array([[0.1, 0.6], [0.9, 0.4] ])
(sums up to 1 in each column) and "true" distribution:
p = np.array([0.5, 0.5])
I would like to calculate the KL divergence from p
to every column of qs
in TensorFlow. I know that there is a function tf.distributions.kl_divergence
, but it takes just two distributions...