def testIsVariableInitialized(self):
    for use_gpu in [True, False]:
        with self.test_session(use_gpu=use_gpu):
            v0 = state_ops.variable_op([1, 2], dtypes.float32)
            self.assertEqual(False, variables.is_variable_initialized(v0).eval())
            state_ops.assign(v0, [[2.0, 3.0]]).eval()
            self.assertEqual(True, variables.is_variable_initialized(v0).eval())
def testIsVariableInitialized(self):
    for use_gpu in [True, False]:
        with self.test_session(use_gpu=use_gpu):
            v0 = state_ops.variable_op([1, 2], dtypes.float32)
            self.assertEqual(False, variables.is_variable_initialized(v0).eval())
            state_ops.assign(v0, [[2.0, 3.0]]).eval()
            self.assertEqual(True, variables.is_variable_initialized(v0).eval())