summary_image | R Documentation |
Creates a image summary
summary_image(img, ..., metadata = NULL, tag = NA)
## S3 method for class 'ggplot'
summary_image(img, ..., width = 480, height = 480, metadata = NULL, tag = NA)
## S3 method for class 'array'
summary_image(img, ..., metadata = NULL, tag = NA)
## S3 method for class 'blob'
summary_image(img, ..., width, height, colorspace, metadata = NULL, tag = NA)
## S3 method for class 'raw'
summary_image(img, ..., width, height, colorspace, metadata = NULL, tag = NA)
img |
An object that can be converted to an image. |
... |
Currently unused. |
metadata |
A |
tag |
A tag that within the TensorBoard UI. See |
width |
Width of the image. |
height |
Height of the image. |
colorspace |
Valid colorspace values are
|
An image summary that can be logged with log_event()
.
summary_image(ggplot)
: Cretes an image summary from a ggplot2 graph object.
The ...
will be forwarded to grDevices::png()
.
summary_image(array)
: Creates an image from an R array. The array should be
numeric, with values between 0 and 1. Dimensions should be (batch, height, width, channels)
.
summary_image(blob)
: Creates an image from blob::blob()
vctr of PNG encoded images,
(eg using png::writePNG()
). width
, height
and colorspace
are recycled
thus they can be a single scalar or a vector the same size of the images blob.
summary_image(raw)
: Creates an image from a png encoded image. Eg, created
with png::writePNG()
. In this case you need to provide width
, height
and
colorspace
arguments.
Other summary:
summary_audio()
,
summary_histogram()
,
summary_scalar()
,
summary_text()
tmp <- tempfile()
with_logdir(tmp, {
summary_image(array(runif(100), dim = c(1,10, 10, 1)))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.