layer_image_resize: Layer Resize Images

Description Usage Arguments See Also Examples

Description

Resize images.

Usage

1
2
layer_image_resize(object, size, align_corners = FALSE, method = "bilinear",
  name = NULL)

Arguments

object

Model or layer object

size

integer of 2 elements: new_height, new_width. The new size for the images

align_corners

If TRUE, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. Defaults to FALSE.

method

Could be 'nearest_neighbor', 'bicubic', 'area' or 'bilinear'. Defaults to "bilinear".

name

An optional name string for the layer. Should be unique in a model (do not reuse the same name twice). It will be autogenerated if it isn't provided.

See Also

Other image: layer_image_rgb_to_grayscale

Examples

1
2
3
4
5
6
7
## Not run: 
library(keras)
library(kextra)
images <- layer_input(c(200, 200, 3))
images_resized <- layer_image_resize(images, c(100, 100))

## End(Not run)

dfalbel/kextra documentation built on May 13, 2019, 3 a.m.