def testGammaShape(self):
with self.test_session():
alpha = constant_op.constant([3.0] * 5)
beta = constant_op.constant(11.0)
gamma = gamma_lib.Gamma(alpha=alpha, beta=beta)
self.assertEqual(gamma.batch_shape().eval(), (5,))
self.assertEqual(gamma.get_batch_shape(), tensor_shape.TensorShape([5]))
self.assertAllEqual(gamma.event_shape().eval(), [])
self.assertEqual(gamma.get_event_shape(), tensor_shape.TensorShape([]))
gamma_test.py 文件源码
python
阅读 63
收藏 0
点赞 0
评论 0
评论列表
文章目录