summary_image {tfevents} | R Documentation |
Creates a image summary
Description
Creates a image summary
Usage
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)
Arguments
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
|
Value
An image summary that can be logged with log_event()
.
Methods (by class)
-
summary_image(ggplot)
: Cretes an image summary from a ggplot2 graph object. The...
will be forwarded togrDevices::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 fromblob::blob()
vctr of PNG encoded images, (eg usingpng::writePNG()
).width
,height
andcolorspace
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 withpng::writePNG()
. In this case you need to providewidth
,height
andcolorspace
arguments.
See Also
Other summary:
summary_audio()
,
summary_histogram()
,
summary_scalar()
,
summary_text()
Examples
tmp <- tempfile()
with_logdir(tmp, {
summary_image(array(runif(100), dim = c(1,10, 10, 1)))
})