Exemple #1
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)
Exemple #3
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)
 def test_sum0(self):
     got = self._compute_until(self.data, "dense_sum")
     expected = sum0_out(product0_out(indicators(self.data)))
     self.assertAllClose(got, expected)