Exemplo n.º 1
0
 def testShakeShake(self):
     x = np.random.rand(5, 7)
     with self.test_session() as session:
         x = tf.constant(x, dtype=tf.float32)
         y = common_layers.shakeshake([x, x, x, x, x])
         inp, res = session.run([x, y])
     self.assertAllClose(res, inp)
Exemplo n.º 2
0
 def testShakeShake(self):
   x = np.random.rand(5, 7)
   with self.test_session() as session:
     x = tf.constant(x, dtype=tf.float32)
     y = common_layers.shakeshake([x, x, x, x, x])
     inp, res = session.run([x, y])
   self.assertAllClose(res, inp)
Exemplo n.º 3
0
    def testShakeShake(self):
        if tf.executing_eagerly():
            return  # don't run test in Eager mode

        x = np.random.rand(5, 7)
        with self.session() as session:
            x = tf.constant(x, dtype=tf.float32)
            y = common_layers.shakeshake([x, x, x, x, x])
            inp, res = session.run([x, y])
        self.assertAllClose(res, inp)