MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / function

Function function

tensorflow/python/ops/summary_ops_v2.py:739–753  ·  view source on GitHub ↗
(tag, scope)

Source from the content-addressed store, hash-verified

737 """Writes a tensor summary if possible."""
738
739 def function(tag, scope):
740 if metadata is None:
741 serialized_metadata = constant_op.constant("")
742 elif hasattr(metadata, "SerializeToString"):
743 serialized_metadata = constant_op.constant(metadata.SerializeToString())
744 else:
745 serialized_metadata = metadata
746 # Note the identity to move the tensor to the CPU.
747 return gen_summary_ops.write_summary(
748 context.context().summary_writer._resource, # pylint: disable=protected-access
749 _choose_step(step),
750 array_ops.identity(tensor),
751 tag,
752 serialized_metadata,
753 name=scope)
754 return summary_writer_function(name, tensor, function, family=family)
755
756

Callers 1

recordFunction · 0.70

Calls 5

_choose_stepFunction · 0.85
constantMethod · 0.45
SerializeToStringMethod · 0.45
contextMethod · 0.45
identityMethod · 0.45

Tested by

no test coverage detected