Ejemplo n.º 1
0
 def biasd_dense_elu(x, y, z):
     dot = gen_composite_ops.my_biased_dense(x, y, z)
     return nn_ops.elu(dot)  # with known kernel, should not expand.
Ejemplo n.º 2
0
 def testBiasedDenseRelu(self):
     t1 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]])
     t2 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]])
     t3 = constant_op.constant([[-10.0, -10.0], [-10.0, -10.0]])
     sq = gen_composite_ops.my_biased_dense(t1, t2, t3, act='relu')
     self.assertAllEqual(sq.numpy().reshape(-1), [0, 0, 5, 12])