parameters: (metagraph, detailed_report=True, cluster=None)
return_statement: return report
docstring: Analyze the peak memory usage for the provided metagraph.
  
    Args:
      metagraph: A TensorFlow MetaGraphDef.
      detailed_report: print the live tensors in addition to the peak memory
        usage.
      cluster: Analyze the memory using the specified cluster, or the local
        machine if no cluster was specified.
  
    Returns:
      A string with the formatted memory usage.
docstring_summary: Analyze the peak memory usage for the provided metagraph.
docstring_tokens: Analyze the peak memory usage for the provided metagraph .
function: def GenerateMemoryReport(metagraph, detailed_report=True, cluster=None):
    """Analyze the peak memory usage for the provided metagraph.
  
    Args:
      metagraph: A TensorFlow MetaGraphDef.
      detailed_report: print the live tensors in addition to the peak memory
        usage.
      cluster: Analyze the memory using the specified cluster, or the local
        machine if no cluster was specified.
  
    Returns:
      A string with the formatted memory usage.
    """
    if cluster is None:
      cluster = gcluster.Cluster(
          disable_detailed_stats=True, disable_timeline=True)
  
    item = gitem.Item(metagraph)
    peak_usage = cluster.DeterminePeakMemoryUsage(item)
    report = ""
    for device, snapshot in peak_usage.items():
      peak_usage = snapshot[0]
      report += "Peak usage for device " + device + ": " + str(
          peak_usage) + " bytes\n"
      if detailed_report:
        live_tensors = snapshot[1]
        for tensor in live_tensors:
          op_name = tensor[0]
          output_id = tensor[1]
          mem_used = tensor[2]
          report += "  " + str(op_name) + ":" + str(output_id) + " uses " + str(
              mem_used) + " bytes\n"
  
    return report
function_tokens: def GenerateMemoryReport ( metagraph , detailed_report = True , cluster = None ) : if cluster is None : cluster = gcluster . Cluster ( disable_detailed_stats = True , disable_timeline = True ) item = gitem . Item ( metagraph ) peak_usage = cluster . DeterminePeakMemoryUsage ( item ) report = "" for device , snapshot in peak_usage . items ( ) : peak_usage = snapshot [ 0 ] report += "Peak usage for device " + device + ": " + str ( peak_usage ) + " bytes\n" if detailed_report : live_tensors = snapshot [ 1 ] for tensor in live_tensors : op_name = tensor [ 0 ] output_id = tensor [ 1 ] mem_used = tensor [ 2 ] report += "  " + str ( op_name ) + ":" + str ( output_id ) + " uses " + str ( mem_used ) + " bytes\n" return report