Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nnf_fold

Fold


Description

Combines an array of sliding local blocks into a large containing tensor.

Usage

nnf_fold(
  input,
  output_size,
  kernel_size,
  dilation = 1,
  padding = 0,
  stride = 1
)

Arguments

input

the input tensor

output_size

the shape of the spatial dimensions of the output (i.e., output$sizes()[-c(1,2)])

kernel_size

the size of the sliding blocks

dilation

a parameter that controls the stride of elements within the neighborhood. Default: 1

padding

implicit zero padding to be added on both sides of input. Default: 0

stride

the stride of the sliding blocks in the input spatial dimensions. Default: 1

Warning

Currently, only 4-D output tensors (batched image-like tensors) are supported.


torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.