class_docstr: Estimates memory cost of a MTF graph based on the size of MTF tensors.
  
  Usage Example:
    estimator = memory_estimator.MemoryEstimator(mtf_graph, mesh_shape)
    layout_validator = estimator.get_layout_validator()
    graph = estimator.get_graph_interface()
  
  Attributes:
    mtf_graph: an mtf.Graph, see argument in __init__.
    mesh_shape: an mtf.Shape, see argument in __init__.
    mtf_outputs: an iterable of mtf.Tensor, see argument in __init__.
class_docstr_tok: ["Estimates","memory","cost","of","a","MTF","graph","based","on","the","size","of","MTF","tensors",".","Usage","Example",":","estimator","=","memory_estimator.MemoryEstimator","(","mtf_graph",",","mesh_shape",")","layout_validator","=","estimator.get_layout_validator","(",")","graph","=","estimator.get_graph_interface","(",")","Attributes",":","mtf_graph",":","an","mtf.Graph",",","see","argument","in","__init__",".","mesh_shape",":","an","mtf.Shape",",","see","argument","in","__init__",".","mtf_outputs",":","an","iterable","of","mtf.Tensor",",","see","argument","in","__init__","."]
docstr: Initializer.
  
  Args:
    mtf_graph: a mtf.Graph.
    mesh_shape: an mtf.Shape.
    mtf_outputs: an optional iterable of mtf.Tensor, representing the outputs
        of the computation.
docstr_tok: ["Initializer",".","Args",":","mtf_graph",":","a","mtf.Graph",".","mesh_shape",":","an","mtf.Shape",".","mtf_outputs",":","an","optional","iterable","of","mtf.Tensor",",","representing","the","outputs","of","the","computation","."]
code: def __init__(self, mtf_graph, mesh_shape, mtf_outputs=()):
      """Initializer.
  
      Args:
        mtf_graph: a mtf.Graph.
        mesh_shape: an mtf.Shape.
        mtf_outputs: an optional iterable of mtf.Tensor, representing the outputs
            of the computation.
      """
      self.mtf_graph = mtf_graph
      self.mesh_shape = mesh_shape
      self.mtf_outputs = mtf_outputs
  
      self._layout_validator = None  # valid_layouts.LayoutValidator
      self._graph_interface = None
  
file_path: mesh/mesh_tensorflow/auto_mtf/memory_estimator.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from mesh_tensorflow.auto_mtf import graph_interface
  from mesh_tensorflow.auto_mtf import valid_layouts
label_desc: Use image node_id 1 to create a new MemoryEstimator object from inherited base classes: object with example: obj = MemoryEstimator(mtf_graph, mesh_shape, mtf_outputs)