示例#1
0
 def test_product1(self):
     got = self._compute_until(self.data, "dense_product_1")
     expected = product1_out(sum0_out(product0_out(normal_leafs(self.data))))
     self.assertAllClose(got, expected)
示例#2
0
 def test_root(self):
     got = tf.exp(self.spn(self.data))
     expected = root_out(product1_out(sum0_out(product0_out(normal_leafs(self.data)))))
     self.assertAllClose(got, expected)
 def test_root(self):
     got = tf.exp(self.discrete_spn(self.data))
     expected = root_out(
         product1_out(sum0_out(product0_out(indicators(self.data)))))
     self.assertAllClose(got, expected)