![]() |
Write an image summary.
tf.compat.v2.summary.image(
name,
data,
step=None,
max_outputs=3,
description=None
)
Arguments:
name
: A name for this summary. The summary tag used for TensorBoard will be this name prefixed by any active name scopes.data
: ATensor
representing pixel data with shape[k, h, w, c]
, wherek
is the number of images,h
andw
are the height and width of the images, andc
is the number of channels, which should be 1, 2, 3, or 4 (grayscale, grayscale with alpha, RGB, RGBA). Any of the dimensions may be statically unknown (i.e.,None
). Floating point data will be clipped to the range [0,1).step
: Explicitint64
-castable monotonic step value for this summary. If omitted, this defaults totf.summary.experimental.get_step()
, which must not be None.max_outputs
: Optionalint
or rank-0 integerTensor
. At most this many images will be emitted at each step. When more thanmax_outputs
many images are provided, the firstmax_outputs
many images will be used and the rest silently discarded.description
: Optional long-form description for this summary, as a constantstr
. Markdown is supported. Defaults to empty.
Returns:
True on success, or false if no summary was emitted because no default summary writer was available.
Raises:
ValueError
: if a default writer exists, but no step was provided andtf.summary.experimental.get_step()
is None.