def testTemporaryVariable(self):
    with self.test_session(use_gpu=True):
        var = gen_state_ops._temporary_variable([1, 2], dtypes.float32, var_name='foo')
        var = state_ops.assign(var, [[4.0, 5.0]])
        var = state_ops.assign_add(var, [[6.0, 7.0]])
        final = gen_state_ops._destroy_temporary_variable(var, var_name='foo')
        self.assertAllClose([[10.0, 12.0]], final.eval())
def testTemporaryVariable(self):
    with self.test_session(use_gpu=True):
        var = gen_state_ops._temporary_variable([1, 2], dtypes.float32, var_name='foo')
        var = state_ops.assign(var, [[4.0, 5.0]])
        var = state_ops.assign_add(var, [[6.0, 7.0]])
        final = gen_state_ops._destroy_temporary_variable(var, var_name='foo')
        self.assertAllClose([[10.0, 12.0]], final.eval())