Esempio n. 1
0
 def test_get_variable_ddi(self):
     with tf.Graph().as_default():
         x_t = tf.random_normal((5, 5))
         ddi = glow_ops.get_variable_ddi("x", (5, 5), x_t, init=True)
         with tf.Session() as session:
             diff = ddi - x_t
             self.assertTrue(np.allclose(session.run(diff), 0.0))
Esempio n. 2
0
 def test_get_variable_ddi(self):
   with tf.Graph().as_default():
     x_t = tf.random_normal((5, 5))
     ddi = glow_ops.get_variable_ddi(
         "x", (5, 5), initial_value=x_t, init=True)
     with tf.Session() as session:
       diff = ddi - x_t
       self.assertTrue(np.allclose(session.run(diff), 0.0))