我有两个张量,prob_a并prob_b与形状[None, 1000],我想从计算KL散prob_a到prob_b.TensorFlow中是否有内置功能?我尝试过使用tf.contrib.distributions.kl(prob_a, prob_b)但它给出了:
prob_a
prob_b
[None, 1000]
tf.contrib.distributions.kl(prob_a, prob_b)
如果没有内置功能,那么什么是好的解决方法?
python statistics entropy tensorflow
entropy ×1
python ×1
statistics ×1
tensorflow ×1