class_docstr: Tests the Python interface to recomputation rewrites.
  
  See core/grappler/optimizers/memory_optimizer_test.cc for functional tests.
class_docstr_tok: ["Tests","the","Python","interface","to","recomputation","rewrites",".","See","core\/grappler\/optimizers\/memory_optimizer_test.cc","for","functional","tests","."]
docstr: Tests that graph output is not significantly different with rewriting.
docstr_tok: ["Tests","that","graph","output","is","not","significantly","different","with","rewriting","."]
code: def testRecomputationRewritingNoErrors(self):
      """Tests that graph output is not significantly different with rewriting."""
      (
          original_metagraph,
          init_op_name,
          train_op_name,
          loss_op_name,
      ) = self._GetMetaGraph()
      original_loss = self._RunMetaGraphWithConfig(
          config=config_pb2.ConfigProto(),
          metagraph=original_metagraph,
          init_op_name=init_op_name,
          train_op_name=train_op_name,
          loss_op_name=loss_op_name,
      )
      memory_optimized_loss = self._RunMetaGraphWithConfig(
          config=self._GetMemoryOptimizerSessionConfig(),
          metagraph=original_metagraph,
          init_op_name=init_op_name,
          train_op_name=train_op_name,
          loss_op_name=loss_op_name,
      )
      self.assertAllClose(
          original_loss, memory_optimized_loss, rtol=1e-2
      )
  
imports: from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import meta_graph
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.framework import test_util
  from tensorflow.python.grappler import tf_optimizer
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.training import training
label_desc: Use image node_id 7 for calling the MemoryOptimizerRecomputeTest obj's underlying member method code with example usage: obj.testRecomputationRewritingNoErrors() without return types