Skip to contents

Applies a 3D adaptive average pooling over an input signal composed of several input planes.

Input and Output Channels

One input channel called "input" and one output channel called "output". For an explanation see PipeOpTorch.

State

The state is the value calculated by the public method $shapes_out().

Credit

Part of this documentation have been copied or adapted from the documentation of torch.

Internals

Calls nn_avg_pool3d() during training.

Parameters

  • kernel_size :: (integer())
    The size of the window. Can be a single number or a vector.

  • stride :: integer()
    The stride of the window. Can be a single number or a vector. Default: kernel_size.

  • padding :: integer()
    Implicit zero paddings on both sides of the input. Can be a single number or a vector. Default: 0.

  • ceil_mode :: integer()
    When TRUE, will use ceil instead of floor to compute the output shape. Default: FALSE.

  • count_include_pad :: logical(1)
    When TRUE, will include the zero-padding in the averaging calculation. Default: TRUE.

  • divisor_override :: logical(1)
    If specified, it will be used as divisor, otherwise size of the pooling region will be used. Default: NULL. Only available for dimension greater than 1.

Super classes

mlr3pipelines::PipeOp -> mlr3torch::PipeOpTorch -> mlr3torch::PipeOpTorchAvgPool -> PipeOpTorchAvgPool3D

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage

PipeOpTorchAvgPool3D$new(id = "nn_avg_pool3d", param_vals = list())

Arguments

id

(character(1))
Identifier of the resulting object.

param_vals

(list())
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction.


Method clone()

The objects of this class are cloneable with this method.

Usage

PipeOpTorchAvgPool3D$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# Construct the PipeOp
pipeop = po("nn_avg_pool3d")
pipeop
#> PipeOp: <nn_avg_pool3d> (not trained)
#> values: <list()>
#> Input channels <name [train type, predict type]>:
#>   input [ModelDescriptor,Task]
#> Output channels <name [train type, predict type]>:
#>   output [ModelDescriptor,Task]
# The available parameters
pipeop$param_set
#> <ParamSet(6)>
#>                   id    class lower upper nlevels        default  value
#>               <char>   <char> <num> <num>   <num>         <list> <list>
#> 1:       kernel_size ParamUty    NA    NA     Inf <NoDefault[0]> [NULL]
#> 2:            stride ParamUty    NA    NA     Inf         [NULL] [NULL]
#> 3:           padding ParamUty    NA    NA     Inf              0 [NULL]
#> 4:         ceil_mode ParamLgl    NA    NA       2          FALSE [NULL]
#> 5: count_include_pad ParamLgl    NA    NA       2           TRUE [NULL]
#> 6:  divisor_override ParamDbl     0   Inf     Inf         [NULL] [NULL]