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: LayoutValidator for the model and mesh_shape.
  
  Returns:
    a valid_layouts.LayoutValidator
docstr_tok: ["LayoutValidator","for","the","model","and","mesh_shape",".","Returns",":","a","valid_layouts.LayoutValidator"]
code: def get_layout_validator(self):
      """LayoutValidator for the model and mesh_shape.
  
      Returns:
        a valid_layouts.LayoutValidator
      """
      if self._layout_validator is None:
          self._compute_layout_validator()
      return self._layout_validator
  
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 2 for calling the MemoryEstimator obj's underlying member method code with example usage: obj.get_layout_validator() and returns: self