MCPcopy Index your code
hub / github.com/tensorflow/models / _OutputRecorderAction

Class _OutputRecorderAction

official/benchmark/benchmark_lib.py:32–42  ·  view source on GitHub ↗

Simple `Action` that saves the outputs passed to `__call__`.

Source from the content-addressed store, hash-verified

30
31
32class _OutputRecorderAction:
33 """Simple `Action` that saves the outputs passed to `__call__`."""
34
35 def __init__(self):
36 self.train_output = {}
37
38 def __call__(
39 self,
40 output: Optional[Mapping[str, tf.Tensor]] = None) -> Mapping[str, Any]:
41 self.train_output = {k: v.numpy() for k, v in output.items()
42 } if output else {}
43
44
45def run_benchmark(

Callers 1

run_benchmarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected