setup_filter: Convenience function to setup 2D FIR filter for...

View source: R/upfirdn2d.R

setup_filterR Documentation

Convenience function to setup 2D FIR filter for upfirdn2d().

Description

Convenience function to setup 2D FIR filter for upfirdn2d().

Usage

setup_filter(
  f,
  device = torch_device("cpu"),
  normalize = TRUE,
  flip_filter = FALSE,
  gain = 1,
  separable = NULL
)

Arguments

f

Torch tensor, or R array of the shape: c(filter_height, filter_width) (non-separable), filter_taps (separable), interger() (impulse), or NULL (identity).

device

Result device (default: cpu).

normalize

Normalize the filter so that it retains the magnitude for constant input signal (DC)? (default: TRUE).

flip_filter

Flip the filter? (default: FALSE).

gain

Overall scaling factor for signal magnitude (default: 1).

separable

Return a separable filter? (default: select automatically).

Value

Float32 tensor of the shape: c(filter_height, filter_width) (non-separable) or filter_taps (separable).


rdinnager/styleganr documentation built on Nov. 9, 2022, 6:09 a.m.