def testGetLogitsAndProbsProbability(self):
p = np.array([0.01, 0.2, 0.5, 0.7, .99], dtype=np.float32)
with self.test_session():
new_logits, new_p = distribution_util.get_logits_and_probs(
probs=p, validate_args=True)
self.assertAllClose(special.logit(p), new_logits.eval())
self.assertAllClose(p, new_p.eval())
distribution_util_test.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录