def test_init(self):
with self.test_session(use_gpu=True):
with self.assertRaisesRegexp(
ValueError, "Either.*should be passed but not both"):
FoldNormal(mean=tf.ones([2, 1]))
with self.assertRaisesRegexp(
ValueError, "Either.*should be passed but not both"):
FoldNormal(mean=tf.ones([2, 1]), std=1., logstd=0.)
with self.assertRaisesRegexp(ValueError,
"should be broadcastable to match"):
FoldNormal(mean=tf.ones([2, 1]), logstd=tf.zeros([2, 4, 3]))
with self.assertRaisesRegexp(ValueError,
"should be broadcastable to match"):
FoldNormal(mean=tf.ones([2, 1]), std=tf.ones([2, 4, 3]))
FoldNormal(mean=tf.placeholder(tf.float32, [None, 1]),
logstd=tf.placeholder(tf.float32, [None, 1, 3]))
FoldNormal(mean=tf.placeholder(tf.float32, [None, 1]),
std=tf.placeholder(tf.float32, [None, 1, 3]))
评论列表
文章目录