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

Function image

tensorflow/python/ops/summary_ops_v2.py:804–820  ·  view source on GitHub ↗

Writes an image summary if possible.

(name, tensor, bad_color=None, max_images=3, family=None, step=None)

Source from the content-addressed store, hash-verified

802
803
804def image(name, tensor, bad_color=None, max_images=3, family=None, step=None):
805 """Writes an image summary if possible."""
806
807 def function(tag, scope):
808 bad_color_ = (constant_op.constant([255, 0, 0, 255], dtype=dtypes.uint8)
809 if bad_color is None else bad_color)
810 # Note the identity to move the tensor to the CPU.
811 return gen_summary_ops.write_image_summary(
812 context.context().summary_writer._resource, # pylint: disable=protected-access
813 _choose_step(step),
814 tag,
815 array_ops.identity(tensor),
816 bad_color_,
817 max_images,
818 name=scope)
819
820 return summary_writer_function(name, tensor, function, family=family)
821
822
823def audio(name, tensor, sample_rate, max_outputs, family=None, step=None):

Callers

nothing calls this directly

Calls 1

summary_writer_functionFunction · 0.85

Tested by

no test coverage detected