tf.summary.image
Stay organized with collections
Save and categorize content based on your preferences.
Write an image summary.
tf.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
|
A Tensor representing pixel data with shape [k, h, w, c] ,
where k is the number of images, h and w are the height and
width of the images, and c 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
|
Explicit int64 -castable monotonic step value for this summary. If
omitted, this defaults to tf.summary.experimental.get_step() , which must
not be None.
|
max_outputs
|
Optional int or rank-0 integer Tensor . At most this
many images will be emitted at each step. When more than
max_outputs many images are provided, the first max_outputs many
images will be used and the rest silently discarded.
|
description
|
Optional long-form description for this summary, as a
constant str . Markdown is supported. Defaults to empty.
|
Returns |
True on success, or false if no summary was emitted because no default
summary writer was available.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.summary.image\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/summary/image) | [View source on GitHub](https://github.com/tensorflow/tensorboard/tree/master/tensorboard/plugins/image/summary_v2.py) |\n\nWrite an image summary. \n\n tf.summary.image(\n name, data, step=None, max_outputs=3, description=None\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Arguments --------- ||\n|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | A name for this summary. The summary tag used for TensorBoard will be this name prefixed by any active name scopes. |\n| `data` | A `Tensor` representing pixel data with shape `[k, h, w, c]`, where `k` is the number of images, `h` and `w` are the height and width of the images, and `c` 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). |\n| `step` | Explicit `int64`-castable monotonic step value for this summary. If omitted, this defaults to [`tf.summary.experimental.get_step()`](../../tf/summary/experimental/get_step), which must not be None. |\n| `max_outputs` | Optional `int` or rank-0 integer `Tensor`. At most this many images will be emitted at each step. When more than `max_outputs` many images are provided, the first `max_outputs` many images will be used and the rest silently discarded. |\n| `description` | Optional long-form description for this summary, as a constant `str`. Markdown is supported. Defaults to empty. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| True on success, or false if no summary was emitted because no default summary writer was available. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ValueError` | if a default writer exists, but no step was provided and [`tf.summary.experimental.get_step()`](../../tf/summary/experimental/get_step) is None. |\n\n\u003cbr /\u003e"]]