def GenerateCostReport(metagraph, per_node_report=False, verbose=False, cluster=None): """Analyze the cost of each TensorFlow op and node in the provided metagraph. Args: metagraph: A TensorFlow MetaGraphDef. per_node_report: by default the report contains stats aggregated on a per op type basis, setting per_node_report to True adds results for each individual node to the report. verbose: Prints out the entire operation proto instead of a summary table. cluster: Analyze the costs using the specified cluster, or the local machine if no cluster was specified. Returns: A string of cost report. """ if cluster is None: cluster = gcluster.Cluster(disable_detailed_stats=False) with errors.raise_exception_on_not_ok_status(): ret_from_swig = tf_wrap.GenerateCostReport(metagraph.SerializeToString(), per_node_report, verbose, cluster.tf_cluster) return ret_from_swig
def GenerateCostReport(metagraph, per_node_report=False): """Analyze the cost of each TensorFlow op and node in the provided metagraph. Args: metagraph: An TensorFlow MetaGraphDef. per_node_report: by default the report contains stats aggregated on a per op type basis, setting per_node_report to True adds results for each individual node to the report. Returns: A string of cost report. """ with errors.raise_exception_on_not_ok_status(): ret_from_swig = tf_wrap.GenerateCostReport( metagraph.SerializeToString(), per_node_report) return ret_from_swig
def GenerateCostReport(metagraph): """Analyze the cost of each TensorFlow operation in the provided metagraph.""" with errors.raise_exception_on_not_ok_status(): ret_from_swig = tf_wrap.GenerateCostReport( metagraph.SerializeToString()) return ret_from_swig