class tf.test.BenchmarkAbstract class that provides helpers for TensorFlow benchmarks.
is_abstract(cls)report_benchmark(iters=None, cpu_time=None, wall_time=None, throughput=None, extras=None, name=None)Report a benchmark.
iters: (optional) How many iterations were runcpu_time: (optional) Total cpu time in secondswall_time: (optional) Total wall time in secondsthroughput: (optional) Throughput (in MB/s)extras: (optional) Dict mapping string keys to additional benchmark info. Values may be either floats or values that are convertible to strings.name: (optional) Override the BenchmarkEntry name with name. Otherwise it is inferred from the top-level method name.run_op_benchmark(sess, op_or_tensor, feed_dict=None, burn_iters=2, min_iters=10, store_trace=False, store_memory_usage=True, name=None, extras=None, mbs=0)Run an op or tensor in the given session. Report the results.
sess: Session object to use for timing.op_or_tensor: Operation or Tensor to benchmark.feed_dict: A dict of values to feed for each op iteration (see the feed_dict parameter of Session.run).burn_iters: Number of burn-in iterations to run.min_iters: Minimum number of iterations to use for timing.store_trace: Boolean, whether to run an extra untimed iteration and store the trace of iteration in the benchmark report. The trace will be stored as a string in Google Chrome trace format in the extras field "full_trace_chrome_format".store_memory_usage: Boolean, whether to run an extra untimed iteration, calculate memory usage, and store that in extras fields.name: (optional) Override the BenchmarkEntry name with name. Otherwise it is inferred from the top-level method name.extras: (optional) Dict mapping string keys to additional benchmark info. Values may be either floats or values that are convertible to strings.mbs: (optional) The number of megabytes moved by this op, used to calculate the ops throughput.A dict containing the key-value pairs that were passed to report_benchmark.
__init__Defined in tensorflow/python/platform/benchmark.py.
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/test/Benchmark