I am trying to calculate the accuracy of my network with KL divergence. The prediction is a k-dimensional probability vector, which shall be compared against a gold-standard probability distribution of the same dimensionality. I tried this:
corr_subj_test = tf.contrib.distributions.kl(pred_subj, y)
accr_subj_test = tf.reduce_mean(corr_subj_test)
But eventually get the following error:
NotImplementedError: No KL(dist_a || dist_b) registered for dist_a type Tensor and dist_b type Tensor