tf.test.Benchmark

Abstract class that provides helpers for TensorFlow benchmarks.

Methods

evaluate

View source

Evaluates tensors and returns numpy values.

Args
tensors A Tensor or a nested list/tuple of Tensors.

Returns
tensors numpy values.

is_abstract

View source

report_benchmark

View source

Report a benchmark.

Args
iters (optional) How many iterations were run
cpu_time (optional) Median or mean cpu time in seconds.
wall_time (optional) Median or mean wall time in seconds.
throughput (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.
metrics (optional) A list of dict, where each dict has the keys below name (required), string, metric name value (required), double, metric value min_value (optional), double, minimum acceptable metric value max_value (optional), double, maximum acceptable metric value

run_op_benchmark

View source