diff --git a/DESCRIPTION b/DESCRIPTION index 6540d8e0..f0452054 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -99,6 +99,7 @@ Collate: 'PipeOpTorch.R' 'PipeOpTaskPreprocTorch.R' 'PipeOpTorchActivation.R' + 'PipeOpTorchAdaptiveAvgPool.R' 'PipeOpTorchAvgPool.R' 'PipeOpTorchBatchNorm.R' 'PipeOpTorchBlock.R' diff --git a/NAMESPACE b/NAMESPACE index ff02b1a6..3ff0873b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -77,6 +77,9 @@ export(ModelDescriptor) export(PipeOpModule) export(PipeOpTaskPreprocTorch) export(PipeOpTorch) +export(PipeOpTorchAdaptiveAvgPool1D) +export(PipeOpTorchAdaptiveAvgPool2D) +export(PipeOpTorchAdaptiveAvgPool3D) export(PipeOpTorchAvgPool1D) export(PipeOpTorchAvgPool2D) export(PipeOpTorchAvgPool3D) diff --git a/R/PipeOpTorchAdaptiveAvgPool.R b/R/PipeOpTorchAdaptiveAvgPool.R new file mode 100644 index 00000000..cb7c7652 --- /dev/null +++ b/R/PipeOpTorchAdaptiveAvgPool.R @@ -0,0 +1,126 @@ +PipeOpTorchAdaptiveAvgPool = R6Class("PipeOpTorchAdaptiveAvgPool", + inherit = PipeOpTorch, + public = list( + initialize = function(id, d, param_vals = list()) { + private$.d = assert_int(d, lower = 1, upper = 3) + module_generator = switch(d, nn_adaptive_avg_pool1d, nn_adaptive_avg_pool2d, nn_adaptive_avg_pool3d) + check_vector = make_check_vector(private$.d) + param_set = ps( + output_size = p_uty(custom_check = check_vector, tags = c("required", "train")) + ) + + super$initialize( + id = id, + param_set = param_set, + param_vals = param_vals, + module_generator = module_generator + ) + } + ), + private = list( + .shapes_out = function(shapes_in, param_vals, task) { + list(adaptive_avg_output_shape( + shape_in = shapes_in[[1]], + conv_dim = private$.d, + output_size = param_vals$output_size + )) + }, + .d = NULL + ) +) + +adaptive_avg_output_shape = function(shape_in, conv_dim, output_size) { + shape_in = assert_integerish(shape_in, min.len = conv_dim, coerce = TRUE) + + if (length(output_size) == 1) output_size = rep(output_size, conv_dim) + + shape_head = utils::head(shape_in, -conv_dim) + if (length(shape_head) <= 1) warningf("Input tensor does not have batch dimension.") + + shape_tail = output_size + + c(shape_head, shape_tail) +} + +#' @title 1D Adaptive Average Pooling +#' +#' @templateVar id nn_adaptive_avg_pool1d +#' @template pipeop_torch_channels_default +#' @template pipeop_torch +#' @template pipeop_torch_example +#' +#' @inherit torch::nnf_adaptive_avg_pool1d description +#' +#' @section Parameters: +#' * `output_size` :: `integer(1)`\cr +#' The target output size. A single number. +#' +#' @section Internals: +#' Calls [`nn_adaptive_avg_pool1d()`][torch::nn_adaptive_avg_pool1d] during training. +#' @export +PipeOpTorchAdaptiveAvgPool1D = R6Class("PipeOpTorchAdaptiveAvgPool1D", inherit = PipeOpTorchAdaptiveAvgPool, + public = list( + #' @description Creates a new instance of this [R6][R6::R6Class] class. + #' @template params_pipelines + initialize = function(id = "nn_adaptive_avg_pool1d", param_vals = list()) { + super$initialize(id = id, d = 1, param_vals = param_vals) + } + ) +) + +#' @title 2D Adaptive Average Pooling +#' +#' @templateVar id nn_adaptive_avg_pool2d +#' @template pipeop_torch_channels_default +#' @template pipeop_torch +#' @template pipeop_torch_example +#' +#' @inherit torch::nnf_adaptive_avg_pool2d description +#' +#' @section Parameters: +#' * `output_size` :: `integer()`\cr +#' The target output size. Can be a single number or a vector. +#' +#' @section Internals: +#' Calls [`nn_adaptive_avg_pool2d()`][torch::nn_adaptive_avg_pool2d] during training. +#' @export +PipeOpTorchAdaptiveAvgPool2D = R6Class("PipeOpTorchAdaptiveAvgPool2D", inherit = PipeOpTorchAdaptiveAvgPool, + public = list( + #' @description Creates a new instance of this [R6][R6::R6Class] class. + #' @template params_pipelines + initialize = function(id = "nn_adaptive_avg_pool2d", param_vals = list()) { + super$initialize(id = id, d = 2, param_vals = param_vals) + } + ) +) + +#' @title 3D Adaptive Average Pooling +#' +#' @templateVar id nn_adaptive_avg_pool3d +#' @template pipeop_torch_channels_default +#' @template pipeop_torch +#' @template pipeop_torch_example +#' +#' @inherit torch::nnf_adaptive_avg_pool3d description +#' +#' @section Parameters: +#' * `output_size` :: `integer()`\cr +#' The target output size. Can be a single number or a vector. +#' +#' @section Internals: +#' Calls [`nn_adaptive_avg_pool3d()`][torch::nn_adaptive_avg_pool3d] during training. +#' @export +PipeOpTorchAdaptiveAvgPool3D = R6Class("PipeOpTorchAdaptiveAvgPool3D", inherit = PipeOpTorchAdaptiveAvgPool, + public = list( + #' @description Creates a new instance of this [R6][R6::R6Class] class. + #' @template params_pipelines + initialize = function(id = "nn_adaptive_avg_pool3d", param_vals = list()) { + super$initialize(id = id, d = 3, param_vals = param_vals) + } + ) +) + +#' @include zzz.R +register_po("nn_adaptive_avg_pool1d", PipeOpTorchAdaptiveAvgPool1D) +register_po("nn_adaptive_avg_pool2d", PipeOpTorchAdaptiveAvgPool2D) +register_po("nn_adaptive_avg_pool3d", PipeOpTorchAdaptiveAvgPool3D) \ No newline at end of file diff --git a/R/PipeOpTorchAvgPool.R b/R/PipeOpTorchAvgPool.R index 16ca09fb..235206a9 100644 --- a/R/PipeOpTorchAvgPool.R +++ b/R/PipeOpTorchAvgPool.R @@ -66,7 +66,7 @@ avg_output_shape = function(shape_in, conv_dim, padding, stride, kernel_size, ce #' @template pipeop_torch #' @template pipeop_torch_example #' -#' @inherit torch::nnf_adaptive_avg_pool1d description +#' @inherit torch::nnf_avg_pool1d description #' #' @section Parameters: #' * `kernel_size` :: (`integer()`)\cr @@ -104,7 +104,7 @@ PipeOpTorchAvgPool1D = R6Class("PipeOpTorchAvgPool1D", inherit = PipeOpTorchAvgP #' @template pipeop_torch #' @template pipeop_torch_example #' -#' @inherit torch::nnf_adaptive_avg_pool2d description +#' @inherit torch::nnf_avg_pool2d description #' #' @inheritSection mlr_pipeops_nn_avg_pool1d Parameters #' @@ -128,7 +128,7 @@ PipeOpTorchAvgPool2D = R6Class("PipeOpTorchAvgPool2D", inherit = PipeOpTorchAvgP #' @template pipeop_torch #' @template pipeop_torch_example #' -#' @inherit torch::nnf_adaptive_avg_pool3d description +#' @inherit torch::nnf_avg_pool3d description #' #' @inheritSection mlr_pipeops_nn_avg_pool1d Parameters #' diff --git a/man/mlr_pipeops_nn_adaptive_avg_pool1d.Rd b/man/mlr_pipeops_nn_adaptive_avg_pool1d.Rd new file mode 100644 index 00000000..64b3fa77 --- /dev/null +++ b/man/mlr_pipeops_nn_adaptive_avg_pool1d.Rd @@ -0,0 +1,176 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/PipeOpTorchAdaptiveAvgPool.R +\name{mlr_pipeops_nn_adaptive_avg_pool1d} +\alias{mlr_pipeops_nn_adaptive_avg_pool1d} +\alias{PipeOpTorchAdaptiveAvgPool1D} +\title{1D Adaptive Average Pooling} +\description{ +Applies a 1D adaptive average pooling over an input signal composed of +several input planes. +} +\section{Input and Output Channels}{ + +One input channel called \code{"input"} and one output channel called \code{"output"}. +For an explanation see \code{\link{PipeOpTorch}}. +} + +\section{State}{ + +The state is the value calculated by the public method \verb{$shapes_out()}. +} + +\section{Credit}{ + +Part of this documentation have been copied or adapted from the documentation of \CRANpkg{torch}. +} + +\section{Parameters}{ + +\itemize{ +\item \code{output_size} :: \code{integer()}\cr +The target output size. A single number. +} +} + +\section{Internals}{ + +Calls \code{\link[torch:nn_adaptive_avg_pool1d]{nn_adaptive_avg_pool1d()}} during training. +} + +\examples{ +\dontshow{if (torch::torch_is_installed()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +# Construct the PipeOp +pipeop = po("nn_adaptive_avg_pool1d") +pipeop +# The available parameters +pipeop$param_set +\dontshow{\}) # examplesIf} +} +\seealso{ +Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, +\code{\link{mlr_pipeops_nn_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_avg_pool3d}}, +\code{\link{mlr_pipeops_nn_batch_norm1d}}, +\code{\link{mlr_pipeops_nn_batch_norm2d}}, +\code{\link{mlr_pipeops_nn_batch_norm3d}}, +\code{\link{mlr_pipeops_nn_block}}, +\code{\link{mlr_pipeops_nn_celu}}, +\code{\link{mlr_pipeops_nn_conv1d}}, +\code{\link{mlr_pipeops_nn_conv2d}}, +\code{\link{mlr_pipeops_nn_conv3d}}, +\code{\link{mlr_pipeops_nn_conv_transpose1d}}, +\code{\link{mlr_pipeops_nn_conv_transpose2d}}, +\code{\link{mlr_pipeops_nn_conv_transpose3d}}, +\code{\link{mlr_pipeops_nn_dropout}}, +\code{\link{mlr_pipeops_nn_elu}}, +\code{\link{mlr_pipeops_nn_flatten}}, +\code{\link{mlr_pipeops_nn_gelu}}, +\code{\link{mlr_pipeops_nn_glu}}, +\code{\link{mlr_pipeops_nn_hardshrink}}, +\code{\link{mlr_pipeops_nn_hardsigmoid}}, +\code{\link{mlr_pipeops_nn_hardtanh}}, +\code{\link{mlr_pipeops_nn_head}}, +\code{\link{mlr_pipeops_nn_layer_norm}}, +\code{\link{mlr_pipeops_nn_leaky_relu}}, +\code{\link{mlr_pipeops_nn_linear}}, +\code{\link{mlr_pipeops_nn_log_sigmoid}}, +\code{\link{mlr_pipeops_nn_max_pool1d}}, +\code{\link{mlr_pipeops_nn_max_pool2d}}, +\code{\link{mlr_pipeops_nn_max_pool3d}}, +\code{\link{mlr_pipeops_nn_merge}}, +\code{\link{mlr_pipeops_nn_merge_cat}}, +\code{\link{mlr_pipeops_nn_merge_prod}}, +\code{\link{mlr_pipeops_nn_merge_sum}}, +\code{\link{mlr_pipeops_nn_prelu}}, +\code{\link{mlr_pipeops_nn_relu}}, +\code{\link{mlr_pipeops_nn_relu6}}, +\code{\link{mlr_pipeops_nn_reshape}}, +\code{\link{mlr_pipeops_nn_rrelu}}, +\code{\link{mlr_pipeops_nn_selu}}, +\code{\link{mlr_pipeops_nn_sigmoid}}, +\code{\link{mlr_pipeops_nn_softmax}}, +\code{\link{mlr_pipeops_nn_softplus}}, +\code{\link{mlr_pipeops_nn_softshrink}}, +\code{\link{mlr_pipeops_nn_softsign}}, +\code{\link{mlr_pipeops_nn_squeeze}}, +\code{\link{mlr_pipeops_nn_tanh}}, +\code{\link{mlr_pipeops_nn_tanhshrink}}, +\code{\link{mlr_pipeops_nn_threshold}}, +\code{\link{mlr_pipeops_nn_unsqueeze}}, +\code{\link{mlr_pipeops_torch_ingress}}, +\code{\link{mlr_pipeops_torch_ingress_categ}}, +\code{\link{mlr_pipeops_torch_ingress_ltnsr}}, +\code{\link{mlr_pipeops_torch_ingress_num}}, +\code{\link{mlr_pipeops_torch_loss}}, +\code{\link{mlr_pipeops_torch_model}}, +\code{\link{mlr_pipeops_torch_model_classif}}, +\code{\link{mlr_pipeops_torch_model_regr}} +} +\concept{PipeOps} +\section{Super classes}{ +\code{\link[mlr3pipelines:PipeOp]{mlr3pipelines::PipeOp}} -> \code{\link[mlr3torch:PipeOpTorch]{mlr3torch::PipeOpTorch}} -> \code{mlr3torch::PipeOpTorchAdaptiveAvgPool} -> \code{PipeOpTorchAdaptiveAvgPool1D} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-PipeOpTorchAdaptiveAvgPool1D-new}{\code{PipeOpTorchAdaptiveAvgPool1D$new()}} +\item \href{#method-PipeOpTorchAdaptiveAvgPool1D-clone}{\code{PipeOpTorchAdaptiveAvgPool1D$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PipeOpTorchAdaptiveAvgPool1D-new}{}}} +\subsection{Method \code{new()}}{ +Creates a new instance of this \link[R6:R6Class]{R6} class. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{PipeOpTorchAdaptiveAvgPool1D$new( + id = "nn_adaptive_avg_pool1d", + param_vals = list() +)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{id}}{(\code{character(1)})\cr +Identifier of the resulting object.} + +\item{\code{param_vals}}{(\code{list()})\cr +List of hyperparameter settings, overwriting the hyperparameter settings that would +otherwise be set during construction.} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PipeOpTorchAdaptiveAvgPool1D-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{PipeOpTorchAdaptiveAvgPool1D$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/mlr_pipeops_nn_adaptive_avg_pool2d.Rd b/man/mlr_pipeops_nn_adaptive_avg_pool2d.Rd new file mode 100644 index 00000000..51f92e91 --- /dev/null +++ b/man/mlr_pipeops_nn_adaptive_avg_pool2d.Rd @@ -0,0 +1,176 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/PipeOpTorchAdaptiveAvgPool.R +\name{mlr_pipeops_nn_adaptive_avg_pool2d} +\alias{mlr_pipeops_nn_adaptive_avg_pool2d} +\alias{PipeOpTorchAdaptiveAvgPool2D} +\title{2D Adaptive Average Pooling} +\description{ +Applies a 2D adaptive average pooling over an input signal composed of +several input planes. +} +\section{Input and Output Channels}{ + +One input channel called \code{"input"} and one output channel called \code{"output"}. +For an explanation see \code{\link{PipeOpTorch}}. +} + +\section{State}{ + +The state is the value calculated by the public method \verb{$shapes_out()}. +} + +\section{Credit}{ + +Part of this documentation have been copied or adapted from the documentation of \CRANpkg{torch}. +} + +\section{Parameters}{ + +\itemize{ +\item \code{output_size} :: \code{integer()}\cr +The target output size. Can be a single number or a vector. +} +} + +\section{Internals}{ + +Calls \code{\link[torch:nn_adaptive_avg_pool2d]{nn_adaptive_avg_pool2d()}} during training. +} + +\examples{ +\dontshow{if (torch::torch_is_installed()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +# Construct the PipeOp +pipeop = po("nn_adaptive_avg_pool2d") +pipeop +# The available parameters +pipeop$param_set +\dontshow{\}) # examplesIf} +} +\seealso{ +Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, +\code{\link{mlr_pipeops_nn_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_avg_pool3d}}, +\code{\link{mlr_pipeops_nn_batch_norm1d}}, +\code{\link{mlr_pipeops_nn_batch_norm2d}}, +\code{\link{mlr_pipeops_nn_batch_norm3d}}, +\code{\link{mlr_pipeops_nn_block}}, +\code{\link{mlr_pipeops_nn_celu}}, +\code{\link{mlr_pipeops_nn_conv1d}}, +\code{\link{mlr_pipeops_nn_conv2d}}, +\code{\link{mlr_pipeops_nn_conv3d}}, +\code{\link{mlr_pipeops_nn_conv_transpose1d}}, +\code{\link{mlr_pipeops_nn_conv_transpose2d}}, +\code{\link{mlr_pipeops_nn_conv_transpose3d}}, +\code{\link{mlr_pipeops_nn_dropout}}, +\code{\link{mlr_pipeops_nn_elu}}, +\code{\link{mlr_pipeops_nn_flatten}}, +\code{\link{mlr_pipeops_nn_gelu}}, +\code{\link{mlr_pipeops_nn_glu}}, +\code{\link{mlr_pipeops_nn_hardshrink}}, +\code{\link{mlr_pipeops_nn_hardsigmoid}}, +\code{\link{mlr_pipeops_nn_hardtanh}}, +\code{\link{mlr_pipeops_nn_head}}, +\code{\link{mlr_pipeops_nn_layer_norm}}, +\code{\link{mlr_pipeops_nn_leaky_relu}}, +\code{\link{mlr_pipeops_nn_linear}}, +\code{\link{mlr_pipeops_nn_log_sigmoid}}, +\code{\link{mlr_pipeops_nn_max_pool1d}}, +\code{\link{mlr_pipeops_nn_max_pool2d}}, +\code{\link{mlr_pipeops_nn_max_pool3d}}, +\code{\link{mlr_pipeops_nn_merge}}, +\code{\link{mlr_pipeops_nn_merge_cat}}, +\code{\link{mlr_pipeops_nn_merge_prod}}, +\code{\link{mlr_pipeops_nn_merge_sum}}, +\code{\link{mlr_pipeops_nn_prelu}}, +\code{\link{mlr_pipeops_nn_relu}}, +\code{\link{mlr_pipeops_nn_relu6}}, +\code{\link{mlr_pipeops_nn_reshape}}, +\code{\link{mlr_pipeops_nn_rrelu}}, +\code{\link{mlr_pipeops_nn_selu}}, +\code{\link{mlr_pipeops_nn_sigmoid}}, +\code{\link{mlr_pipeops_nn_softmax}}, +\code{\link{mlr_pipeops_nn_softplus}}, +\code{\link{mlr_pipeops_nn_softshrink}}, +\code{\link{mlr_pipeops_nn_softsign}}, +\code{\link{mlr_pipeops_nn_squeeze}}, +\code{\link{mlr_pipeops_nn_tanh}}, +\code{\link{mlr_pipeops_nn_tanhshrink}}, +\code{\link{mlr_pipeops_nn_threshold}}, +\code{\link{mlr_pipeops_nn_unsqueeze}}, +\code{\link{mlr_pipeops_torch_ingress}}, +\code{\link{mlr_pipeops_torch_ingress_categ}}, +\code{\link{mlr_pipeops_torch_ingress_ltnsr}}, +\code{\link{mlr_pipeops_torch_ingress_num}}, +\code{\link{mlr_pipeops_torch_loss}}, +\code{\link{mlr_pipeops_torch_model}}, +\code{\link{mlr_pipeops_torch_model_classif}}, +\code{\link{mlr_pipeops_torch_model_regr}} +} +\concept{PipeOps} +\section{Super classes}{ +\code{\link[mlr3pipelines:PipeOp]{mlr3pipelines::PipeOp}} -> \code{\link[mlr3torch:PipeOpTorch]{mlr3torch::PipeOpTorch}} -> \code{mlr3torch::PipeOpTorchAdaptiveAvgPool} -> \code{PipeOpTorchAdaptiveAvgPool2D} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-PipeOpTorchAdaptiveAvgPool2D-new}{\code{PipeOpTorchAdaptiveAvgPool2D$new()}} +\item \href{#method-PipeOpTorchAdaptiveAvgPool2D-clone}{\code{PipeOpTorchAdaptiveAvgPool2D$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PipeOpTorchAdaptiveAvgPool2D-new}{}}} +\subsection{Method \code{new()}}{ +Creates a new instance of this \link[R6:R6Class]{R6} class. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{PipeOpTorchAdaptiveAvgPool2D$new( + id = "nn_adaptive_avg_pool2d", + param_vals = list() +)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{id}}{(\code{character(1)})\cr +Identifier of the resulting object.} + +\item{\code{param_vals}}{(\code{list()})\cr +List of hyperparameter settings, overwriting the hyperparameter settings that would +otherwise be set during construction.} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PipeOpTorchAdaptiveAvgPool2D-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{PipeOpTorchAdaptiveAvgPool2D$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/mlr_pipeops_nn_adaptive_avg_pool3d.Rd b/man/mlr_pipeops_nn_adaptive_avg_pool3d.Rd new file mode 100644 index 00000000..84e9d8f1 --- /dev/null +++ b/man/mlr_pipeops_nn_adaptive_avg_pool3d.Rd @@ -0,0 +1,176 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/PipeOpTorchAdaptiveAvgPool.R +\name{mlr_pipeops_nn_adaptive_avg_pool3d} +\alias{mlr_pipeops_nn_adaptive_avg_pool3d} +\alias{PipeOpTorchAdaptiveAvgPool3D} +\title{3D Adaptive Average Pooling} +\description{ +Applies a 3D adaptive average pooling over an input signal composed of +several input planes. +} +\section{Input and Output Channels}{ + +One input channel called \code{"input"} and one output channel called \code{"output"}. +For an explanation see \code{\link{PipeOpTorch}}. +} + +\section{State}{ + +The state is the value calculated by the public method \verb{$shapes_out()}. +} + +\section{Credit}{ + +Part of this documentation have been copied or adapted from the documentation of \CRANpkg{torch}. +} + +\section{Parameters}{ + +\itemize{ +\item \code{output_size} :: \code{integer()}\cr +The target output size. Can be a single number or a vector. +} +} + +\section{Internals}{ + +Calls \code{\link[torch:nn_adaptive_avg_pool3d]{nn_adaptive_avg_pool3d()}} during training. +} + +\examples{ +\dontshow{if (torch::torch_is_installed()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +# Construct the PipeOp +pipeop = po("nn_adaptive_avg_pool3d") +pipeop +# The available parameters +pipeop$param_set +\dontshow{\}) # examplesIf} +} +\seealso{ +Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_avg_pool3d}}, +\code{\link{mlr_pipeops_nn_batch_norm1d}}, +\code{\link{mlr_pipeops_nn_batch_norm2d}}, +\code{\link{mlr_pipeops_nn_batch_norm3d}}, +\code{\link{mlr_pipeops_nn_block}}, +\code{\link{mlr_pipeops_nn_celu}}, +\code{\link{mlr_pipeops_nn_conv1d}}, +\code{\link{mlr_pipeops_nn_conv2d}}, +\code{\link{mlr_pipeops_nn_conv3d}}, +\code{\link{mlr_pipeops_nn_conv_transpose1d}}, +\code{\link{mlr_pipeops_nn_conv_transpose2d}}, +\code{\link{mlr_pipeops_nn_conv_transpose3d}}, +\code{\link{mlr_pipeops_nn_dropout}}, +\code{\link{mlr_pipeops_nn_elu}}, +\code{\link{mlr_pipeops_nn_flatten}}, +\code{\link{mlr_pipeops_nn_gelu}}, +\code{\link{mlr_pipeops_nn_glu}}, +\code{\link{mlr_pipeops_nn_hardshrink}}, +\code{\link{mlr_pipeops_nn_hardsigmoid}}, +\code{\link{mlr_pipeops_nn_hardtanh}}, +\code{\link{mlr_pipeops_nn_head}}, +\code{\link{mlr_pipeops_nn_layer_norm}}, +\code{\link{mlr_pipeops_nn_leaky_relu}}, +\code{\link{mlr_pipeops_nn_linear}}, +\code{\link{mlr_pipeops_nn_log_sigmoid}}, +\code{\link{mlr_pipeops_nn_max_pool1d}}, +\code{\link{mlr_pipeops_nn_max_pool2d}}, +\code{\link{mlr_pipeops_nn_max_pool3d}}, +\code{\link{mlr_pipeops_nn_merge}}, +\code{\link{mlr_pipeops_nn_merge_cat}}, +\code{\link{mlr_pipeops_nn_merge_prod}}, +\code{\link{mlr_pipeops_nn_merge_sum}}, +\code{\link{mlr_pipeops_nn_prelu}}, +\code{\link{mlr_pipeops_nn_relu}}, +\code{\link{mlr_pipeops_nn_relu6}}, +\code{\link{mlr_pipeops_nn_reshape}}, +\code{\link{mlr_pipeops_nn_rrelu}}, +\code{\link{mlr_pipeops_nn_selu}}, +\code{\link{mlr_pipeops_nn_sigmoid}}, +\code{\link{mlr_pipeops_nn_softmax}}, +\code{\link{mlr_pipeops_nn_softplus}}, +\code{\link{mlr_pipeops_nn_softshrink}}, +\code{\link{mlr_pipeops_nn_softsign}}, +\code{\link{mlr_pipeops_nn_squeeze}}, +\code{\link{mlr_pipeops_nn_tanh}}, +\code{\link{mlr_pipeops_nn_tanhshrink}}, +\code{\link{mlr_pipeops_nn_threshold}}, +\code{\link{mlr_pipeops_nn_unsqueeze}}, +\code{\link{mlr_pipeops_torch_ingress}}, +\code{\link{mlr_pipeops_torch_ingress_categ}}, +\code{\link{mlr_pipeops_torch_ingress_ltnsr}}, +\code{\link{mlr_pipeops_torch_ingress_num}}, +\code{\link{mlr_pipeops_torch_loss}}, +\code{\link{mlr_pipeops_torch_model}}, +\code{\link{mlr_pipeops_torch_model_classif}}, +\code{\link{mlr_pipeops_torch_model_regr}} +} +\concept{PipeOps} +\section{Super classes}{ +\code{\link[mlr3pipelines:PipeOp]{mlr3pipelines::PipeOp}} -> \code{\link[mlr3torch:PipeOpTorch]{mlr3torch::PipeOpTorch}} -> \code{mlr3torch::PipeOpTorchAdaptiveAvgPool} -> \code{PipeOpTorchAdaptiveAvgPool3D} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-PipeOpTorchAdaptiveAvgPool3D-new}{\code{PipeOpTorchAdaptiveAvgPool3D$new()}} +\item \href{#method-PipeOpTorchAdaptiveAvgPool3D-clone}{\code{PipeOpTorchAdaptiveAvgPool3D$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PipeOpTorchAdaptiveAvgPool3D-new}{}}} +\subsection{Method \code{new()}}{ +Creates a new instance of this \link[R6:R6Class]{R6} class. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{PipeOpTorchAdaptiveAvgPool3D$new( + id = "nn_adaptive_avg_pool3d", + param_vals = list() +)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{id}}{(\code{character(1)})\cr +Identifier of the resulting object.} + +\item{\code{param_vals}}{(\code{list()})\cr +List of hyperparameter settings, overwriting the hyperparameter settings that would +otherwise be set during construction.} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PipeOpTorchAdaptiveAvgPool3D-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{PipeOpTorchAdaptiveAvgPool3D$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/mlr_pipeops_nn_avg_pool1d.Rd b/man/mlr_pipeops_nn_avg_pool1d.Rd index 702edb67..19b5b524 100644 --- a/man/mlr_pipeops_nn_avg_pool1d.Rd +++ b/man/mlr_pipeops_nn_avg_pool1d.Rd @@ -5,8 +5,8 @@ \alias{PipeOpTorchAvgPool1D} \title{1D Average Pooling} \description{ -Applies a 1D adaptive average pooling over an input signal composed of -several input planes. +Applies a 1D average pooling over an input signal composed of several +input planes. } \section{Input and Output Channels}{ @@ -59,6 +59,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, \code{\link{mlr_pipeops_nn_batch_norm1d}}, diff --git a/man/mlr_pipeops_nn_avg_pool2d.Rd b/man/mlr_pipeops_nn_avg_pool2d.Rd index 1796fbbb..3d606231 100644 --- a/man/mlr_pipeops_nn_avg_pool2d.Rd +++ b/man/mlr_pipeops_nn_avg_pool2d.Rd @@ -5,8 +5,9 @@ \alias{PipeOpTorchAvgPool2D} \title{2D Average Pooling} \description{ -Applies a 2D adaptive average pooling over an input signal composed of -several input planes. +Applies 2D average-pooling operation in \eqn{kH * kW} regions by step size +\eqn{sH * sW} steps. The number of output features is equal to the number of +input planes. } \section{Input and Output Channels}{ @@ -59,6 +60,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, \code{\link{mlr_pipeops_nn_batch_norm1d}}, diff --git a/man/mlr_pipeops_nn_avg_pool3d.Rd b/man/mlr_pipeops_nn_avg_pool3d.Rd index bc534840..638ed93f 100644 --- a/man/mlr_pipeops_nn_avg_pool3d.Rd +++ b/man/mlr_pipeops_nn_avg_pool3d.Rd @@ -5,8 +5,9 @@ \alias{PipeOpTorchAvgPool3D} \title{3D Average Pooling} \description{ -Applies a 3D adaptive average pooling over an input signal composed of -several input planes. +Applies 3D average-pooling operation in \eqn{kT * kH * kW} regions by step +size \eqn{sT * sH * sW} steps. The number of output features is equal to +\eqn{\lfloor \frac{ \mbox{input planes} }{sT} \rfloor}. } \section{Input and Output Channels}{ @@ -59,6 +60,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_batch_norm1d}}, diff --git a/man/mlr_pipeops_nn_batch_norm1d.Rd b/man/mlr_pipeops_nn_batch_norm1d.Rd index 4c729fdb..b94771ee 100644 --- a/man/mlr_pipeops_nn_batch_norm1d.Rd +++ b/man/mlr_pipeops_nn_batch_norm1d.Rd @@ -57,6 +57,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_batch_norm2d.Rd b/man/mlr_pipeops_nn_batch_norm2d.Rd index efafeaf2..1457acd9 100644 --- a/man/mlr_pipeops_nn_batch_norm2d.Rd +++ b/man/mlr_pipeops_nn_batch_norm2d.Rd @@ -57,6 +57,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_batch_norm3d.Rd b/man/mlr_pipeops_nn_batch_norm3d.Rd index 700136bc..a48cf572 100644 --- a/man/mlr_pipeops_nn_batch_norm3d.Rd +++ b/man/mlr_pipeops_nn_batch_norm3d.Rd @@ -57,6 +57,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_block.Rd b/man/mlr_pipeops_nn_block.Rd index a00c7d9c..1b6f01a5 100644 --- a/man/mlr_pipeops_nn_block.Rd +++ b/man/mlr_pipeops_nn_block.Rd @@ -52,6 +52,9 @@ network$train(task) } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_celu.Rd b/man/mlr_pipeops_nn_celu.Rd index 88fc5f73..9c9a6e14 100644 --- a/man/mlr_pipeops_nn_celu.Rd +++ b/man/mlr_pipeops_nn_celu.Rd @@ -48,6 +48,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_conv1d.Rd b/man/mlr_pipeops_nn_conv1d.Rd index 5c1aba9d..5d2c1052 100644 --- a/man/mlr_pipeops_nn_conv1d.Rd +++ b/man/mlr_pipeops_nn_conv1d.Rd @@ -63,6 +63,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_conv2d.Rd b/man/mlr_pipeops_nn_conv2d.Rd index 0433ccd3..7a46b23f 100644 --- a/man/mlr_pipeops_nn_conv2d.Rd +++ b/man/mlr_pipeops_nn_conv2d.Rd @@ -63,6 +63,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_conv3d.Rd b/man/mlr_pipeops_nn_conv3d.Rd index 73eb6035..5df1d3b2 100644 --- a/man/mlr_pipeops_nn_conv3d.Rd +++ b/man/mlr_pipeops_nn_conv3d.Rd @@ -63,6 +63,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_conv_transpose1d.Rd b/man/mlr_pipeops_nn_conv_transpose1d.Rd index 160edb25..cb640bb3 100644 --- a/man/mlr_pipeops_nn_conv_transpose1d.Rd +++ b/man/mlr_pipeops_nn_conv_transpose1d.Rd @@ -66,6 +66,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_conv_transpose2d.Rd b/man/mlr_pipeops_nn_conv_transpose2d.Rd index b883e1b6..36c71d35 100644 --- a/man/mlr_pipeops_nn_conv_transpose2d.Rd +++ b/man/mlr_pipeops_nn_conv_transpose2d.Rd @@ -65,6 +65,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_conv_transpose3d.Rd b/man/mlr_pipeops_nn_conv_transpose3d.Rd index 7cdfaf4a..e0c5f244 100644 --- a/man/mlr_pipeops_nn_conv_transpose3d.Rd +++ b/man/mlr_pipeops_nn_conv_transpose3d.Rd @@ -65,6 +65,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_dropout.Rd b/man/mlr_pipeops_nn_dropout.Rd index 10383699..ffa82e92 100644 --- a/man/mlr_pipeops_nn_dropout.Rd +++ b/man/mlr_pipeops_nn_dropout.Rd @@ -51,6 +51,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_elu.Rd b/man/mlr_pipeops_nn_elu.Rd index 3f354ffc..7a49e935 100644 --- a/man/mlr_pipeops_nn_elu.Rd +++ b/man/mlr_pipeops_nn_elu.Rd @@ -49,6 +49,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_flatten.Rd b/man/mlr_pipeops_nn_flatten.Rd index f9b97dd1..bda9c17f 100644 --- a/man/mlr_pipeops_nn_flatten.Rd +++ b/man/mlr_pipeops_nn_flatten.Rd @@ -47,6 +47,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_gelu.Rd b/man/mlr_pipeops_nn_gelu.Rd index cd7434a8..888d50e5 100644 --- a/man/mlr_pipeops_nn_gelu.Rd +++ b/man/mlr_pipeops_nn_gelu.Rd @@ -46,6 +46,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_glu.Rd b/man/mlr_pipeops_nn_glu.Rd index 0a7fbe17..f51f5bf1 100644 --- a/man/mlr_pipeops_nn_glu.Rd +++ b/man/mlr_pipeops_nn_glu.Rd @@ -46,6 +46,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_hardshrink.Rd b/man/mlr_pipeops_nn_hardshrink.Rd index e0c15171..433565be 100644 --- a/man/mlr_pipeops_nn_hardshrink.Rd +++ b/man/mlr_pipeops_nn_hardshrink.Rd @@ -46,6 +46,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_hardsigmoid.Rd b/man/mlr_pipeops_nn_hardsigmoid.Rd index 179ae9f5..e303b886 100644 --- a/man/mlr_pipeops_nn_hardsigmoid.Rd +++ b/man/mlr_pipeops_nn_hardsigmoid.Rd @@ -43,6 +43,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_hardtanh.Rd b/man/mlr_pipeops_nn_hardtanh.Rd index 2ee54f93..de06c52d 100644 --- a/man/mlr_pipeops_nn_hardtanh.Rd +++ b/man/mlr_pipeops_nn_hardtanh.Rd @@ -44,6 +44,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_head.Rd b/man/mlr_pipeops_nn_head.Rd index 0f493b5f..9b10ef3a 100644 --- a/man/mlr_pipeops_nn_head.Rd +++ b/man/mlr_pipeops_nn_head.Rd @@ -51,6 +51,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_layer_norm.Rd b/man/mlr_pipeops_nn_layer_norm.Rd index b1ba41f8..3290eda9 100644 --- a/man/mlr_pipeops_nn_layer_norm.Rd +++ b/man/mlr_pipeops_nn_layer_norm.Rd @@ -53,6 +53,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_leaky_relu.Rd b/man/mlr_pipeops_nn_leaky_relu.Rd index 992a7cf8..826d0814 100644 --- a/man/mlr_pipeops_nn_leaky_relu.Rd +++ b/man/mlr_pipeops_nn_leaky_relu.Rd @@ -49,6 +49,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_linear.Rd b/man/mlr_pipeops_nn_linear.Rd index 870bd2d1..5ace03a2 100644 --- a/man/mlr_pipeops_nn_linear.Rd +++ b/man/mlr_pipeops_nn_linear.Rd @@ -51,6 +51,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_log_sigmoid.Rd b/man/mlr_pipeops_nn_log_sigmoid.Rd index 9eda0c62..77fd7fe8 100644 --- a/man/mlr_pipeops_nn_log_sigmoid.Rd +++ b/man/mlr_pipeops_nn_log_sigmoid.Rd @@ -43,6 +43,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_max_pool1d.Rd b/man/mlr_pipeops_nn_max_pool1d.Rd index 4e3da656..bafffa8c 100644 --- a/man/mlr_pipeops_nn_max_pool1d.Rd +++ b/man/mlr_pipeops_nn_max_pool1d.Rd @@ -57,6 +57,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_max_pool2d.Rd b/man/mlr_pipeops_nn_max_pool2d.Rd index cacd57bd..e558f92b 100644 --- a/man/mlr_pipeops_nn_max_pool2d.Rd +++ b/man/mlr_pipeops_nn_max_pool2d.Rd @@ -57,6 +57,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_max_pool3d.Rd b/man/mlr_pipeops_nn_max_pool3d.Rd index c008ee1d..f55e17b5 100644 --- a/man/mlr_pipeops_nn_max_pool3d.Rd +++ b/man/mlr_pipeops_nn_max_pool3d.Rd @@ -57,6 +57,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_merge.Rd b/man/mlr_pipeops_nn_merge.Rd index f8d860f4..efd0b41b 100644 --- a/man/mlr_pipeops_nn_merge.Rd +++ b/man/mlr_pipeops_nn_merge.Rd @@ -37,6 +37,9 @@ This private method can be overwritten by \code{\link{PipeOpTorch}}s inheriting \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_merge_cat.Rd b/man/mlr_pipeops_nn_merge_cat.Rd index 548174d7..3d478da8 100644 --- a/man/mlr_pipeops_nn_merge_cat.Rd +++ b/man/mlr_pipeops_nn_merge_cat.Rd @@ -53,6 +53,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_merge_prod.Rd b/man/mlr_pipeops_nn_merge_prod.Rd index 2f9c37d5..282c8d5a 100644 --- a/man/mlr_pipeops_nn_merge_prod.Rd +++ b/man/mlr_pipeops_nn_merge_prod.Rd @@ -49,6 +49,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_merge_sum.Rd b/man/mlr_pipeops_nn_merge_sum.Rd index 48f23aca..baf78eb1 100644 --- a/man/mlr_pipeops_nn_merge_sum.Rd +++ b/man/mlr_pipeops_nn_merge_sum.Rd @@ -49,6 +49,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, @@ -108,6 +111,9 @@ Other PipeOps: \code{\link{mlr_pipeops_torch_model_regr}} Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_prelu.Rd b/man/mlr_pipeops_nn_prelu.Rd index 008f6a43..eef2460b 100644 --- a/man/mlr_pipeops_nn_prelu.Rd +++ b/man/mlr_pipeops_nn_prelu.Rd @@ -51,6 +51,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_relu.Rd b/man/mlr_pipeops_nn_relu.Rd index 87a51046..8ac4506d 100644 --- a/man/mlr_pipeops_nn_relu.Rd +++ b/man/mlr_pipeops_nn_relu.Rd @@ -46,6 +46,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_relu6.Rd b/man/mlr_pipeops_nn_relu6.Rd index 29a0d2db..8ab8617d 100644 --- a/man/mlr_pipeops_nn_relu6.Rd +++ b/man/mlr_pipeops_nn_relu6.Rd @@ -46,6 +46,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_reshape.Rd b/man/mlr_pipeops_nn_reshape.Rd index a6b1ddb5..70c621e2 100644 --- a/man/mlr_pipeops_nn_reshape.Rd +++ b/man/mlr_pipeops_nn_reshape.Rd @@ -48,6 +48,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_rrelu.Rd b/man/mlr_pipeops_nn_rrelu.Rd index eafc0f94..686be293 100644 --- a/man/mlr_pipeops_nn_rrelu.Rd +++ b/man/mlr_pipeops_nn_rrelu.Rd @@ -50,6 +50,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_selu.Rd b/man/mlr_pipeops_nn_selu.Rd index 65edf8a7..c103a509 100644 --- a/man/mlr_pipeops_nn_selu.Rd +++ b/man/mlr_pipeops_nn_selu.Rd @@ -49,6 +49,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_sigmoid.Rd b/man/mlr_pipeops_nn_sigmoid.Rd index 97f24d57..972de07a 100644 --- a/man/mlr_pipeops_nn_sigmoid.Rd +++ b/man/mlr_pipeops_nn_sigmoid.Rd @@ -43,6 +43,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_softmax.Rd b/man/mlr_pipeops_nn_softmax.Rd index fafccd13..28530707 100644 --- a/man/mlr_pipeops_nn_softmax.Rd +++ b/man/mlr_pipeops_nn_softmax.Rd @@ -47,6 +47,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_softplus.Rd b/man/mlr_pipeops_nn_softplus.Rd index cacb1cb4..45ea02bd 100644 --- a/man/mlr_pipeops_nn_softplus.Rd +++ b/man/mlr_pipeops_nn_softplus.Rd @@ -48,6 +48,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_softshrink.Rd b/man/mlr_pipeops_nn_softshrink.Rd index 54bacc68..b93aefab 100644 --- a/man/mlr_pipeops_nn_softshrink.Rd +++ b/man/mlr_pipeops_nn_softshrink.Rd @@ -46,6 +46,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_softsign.Rd b/man/mlr_pipeops_nn_softsign.Rd index c4771139..8562672a 100644 --- a/man/mlr_pipeops_nn_softsign.Rd +++ b/man/mlr_pipeops_nn_softsign.Rd @@ -43,6 +43,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_squeeze.Rd b/man/mlr_pipeops_nn_squeeze.Rd index be61232b..01713bda 100644 --- a/man/mlr_pipeops_nn_squeeze.Rd +++ b/man/mlr_pipeops_nn_squeeze.Rd @@ -48,6 +48,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_tanh.Rd b/man/mlr_pipeops_nn_tanh.Rd index 417757d7..db78e201 100644 --- a/man/mlr_pipeops_nn_tanh.Rd +++ b/man/mlr_pipeops_nn_tanh.Rd @@ -43,6 +43,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_tanhshrink.Rd b/man/mlr_pipeops_nn_tanhshrink.Rd index 38e25c2f..b1ec3680 100644 --- a/man/mlr_pipeops_nn_tanhshrink.Rd +++ b/man/mlr_pipeops_nn_tanhshrink.Rd @@ -43,6 +43,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_threshold.Rd b/man/mlr_pipeops_nn_threshold.Rd index 99d3ed0b..6a6a4b2b 100644 --- a/man/mlr_pipeops_nn_threshold.Rd +++ b/man/mlr_pipeops_nn_threshold.Rd @@ -50,6 +50,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_nn_unsqueeze.Rd b/man/mlr_pipeops_nn_unsqueeze.Rd index fa327823..973da6b6 100644 --- a/man/mlr_pipeops_nn_unsqueeze.Rd +++ b/man/mlr_pipeops_nn_unsqueeze.Rd @@ -50,6 +50,9 @@ pipeop$param_set } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_torch_ingress.Rd b/man/mlr_pipeops_torch_ingress.Rd index e95e1e0f..89635cbf 100644 --- a/man/mlr_pipeops_torch_ingress.Rd +++ b/man/mlr_pipeops_torch_ingress.Rd @@ -34,6 +34,9 @@ entry point of the network. \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_torch_ingress_categ.Rd b/man/mlr_pipeops_torch_ingress_categ.Rd index d03e118f..5f782f82 100644 --- a/man/mlr_pipeops_torch_ingress_categ.Rd +++ b/man/mlr_pipeops_torch_ingress_categ.Rd @@ -45,6 +45,9 @@ ingress$batchgetter(task$data(1, ingress$features), "cpu") } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_torch_ingress_ltnsr.Rd b/man/mlr_pipeops_torch_ingress_ltnsr.Rd index 9be88989..fe6faaa8 100644 --- a/man/mlr_pipeops_torch_ingress_ltnsr.Rd +++ b/man/mlr_pipeops_torch_ingress_ltnsr.Rd @@ -80,6 +80,9 @@ x_batch2 } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_torch_ingress_num.Rd b/man/mlr_pipeops_torch_ingress_num.Rd index 1add7359..e159f886 100644 --- a/man/mlr_pipeops_torch_ingress_num.Rd +++ b/man/mlr_pipeops_torch_ingress_num.Rd @@ -50,6 +50,9 @@ Other Graph Network: \code{\link{nn_graph}()} Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_torch_loss.Rd b/man/mlr_pipeops_torch_loss.Rd index eeaf6bd5..e420e63b 100644 --- a/man/mlr_pipeops_torch_loss.Rd +++ b/man/mlr_pipeops_torch_loss.Rd @@ -40,6 +40,9 @@ mdout$loss } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_torch_model.Rd b/man/mlr_pipeops_torch_model.Rd index bad5df39..9471d4b0 100644 --- a/man/mlr_pipeops_torch_model.Rd +++ b/man/mlr_pipeops_torch_model.Rd @@ -120,6 +120,9 @@ its '$train()\verb{ method is called on the [}Task\verb{][mlr3::Task] stored in \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_torch_model_classif.Rd b/man/mlr_pipeops_torch_model_classif.Rd index 6565e01b..2151ccdc 100644 --- a/man/mlr_pipeops_torch_model_classif.Rd +++ b/man/mlr_pipeops_torch_model_classif.Rd @@ -51,6 +51,9 @@ po_model$state } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/man/mlr_pipeops_torch_model_regr.Rd b/man/mlr_pipeops_torch_model_regr.Rd index 6b020d7f..4e4f1d76 100644 --- a/man/mlr_pipeops_torch_model_regr.Rd +++ b/man/mlr_pipeops_torch_model_regr.Rd @@ -51,6 +51,9 @@ po_model$state } \seealso{ Other PipeOps: +\code{\link{mlr_pipeops_nn_adaptive_avg_pool1d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool2d}}, +\code{\link{mlr_pipeops_nn_adaptive_avg_pool3d}}, \code{\link{mlr_pipeops_nn_avg_pool1d}}, \code{\link{mlr_pipeops_nn_avg_pool2d}}, \code{\link{mlr_pipeops_nn_avg_pool3d}}, diff --git a/tests/testthat/test_PipeOpTorchAdaptiveAvgPool.R b/tests/testthat/test_PipeOpTorchAdaptiveAvgPool.R new file mode 100644 index 00000000..6d6bca9d --- /dev/null +++ b/tests/testthat/test_PipeOpTorchAdaptiveAvgPool.R @@ -0,0 +1,97 @@ +test_that("PipeOpTorchAdaptiveAvgPool1D works", { + po_test = po("nn_adaptive_avg_pool1d", output_size = 10) + task = tsk("iris") + graph = po("torch_ingress_num") %>>% + po("nn_unsqueeze", dim = 2) %>>% + po_test + expect_pipeop_torch(graph, "nn_adaptive_avg_pool1d", task) +}) + +test_that("PipeOpTorchAdaptiveAvgPool1D paramtest", { + res = expect_paramset(po("nn_adaptive_avg_pool1d"), nn_adaptive_avg_pool1d, exclude = "num_features") + expect_paramtest(res) +}) + +test_that("PipeOpTorchAdaptiveAvgPool2D works with a 1d output size", { + po_test = po("nn_adaptive_avg_pool2d", output_size = 10) + task = nano_imagenet() + graph = po("torch_ingress_ltnsr") %>>% po_test + + expect_pipeop_torch(graph, "nn_adaptive_avg_pool2d", task) +}) + +test_that("PipeOpTorchAdaptiveAvgPool2D works with a 2d output size", { + po_test = po("nn_adaptive_avg_pool2d", output_size = c(8, 12)) + task = nano_imagenet() + graph = po("torch_ingress_ltnsr") %>>% po_test + + expect_pipeop_torch(graph, "nn_adaptive_avg_pool2d", task) +}) + +test_that("PipeOpTorchAdaptiveAvgPool2D paramtest", { + res = expect_paramset(po("nn_adaptive_avg_pool2d"), nn_adaptive_avg_pool2d, exclude = "num_features") + expect_paramtest(res) +}) + +test_that("PipeOpTorchAdaptiveAvgPool3D works with a 1d output size", { + po_test = po("nn_adaptive_avg_pool3d", output_size = 10) + task = nano_imagenet() + graph = po("torch_ingress_ltnsr") %>>% + po("nn_reshape", shape = c(NA, 3, 64, 8, 8)) %>>% + po_test + + expect_pipeop_torch(graph, "nn_adaptive_avg_pool3d", task) +}) + +test_that("PipeOpTorchAdaptiveAvgPool3D works with a 3d output size", { + po_test = po("nn_adaptive_avg_pool3d", output_size = c(10, 11, 12)) + task = nano_imagenet() + graph = po("torch_ingress_ltnsr") %>>% + po("nn_reshape", shape = c(NA, 3, 64, 8, 8)) %>>% + po_test + + expect_pipeop_torch(graph, "nn_adaptive_avg_pool3d", task) +}) + +test_that("PipeOpTorchAdaptiveAvgPool3D paramtest", { + res = expect_paramset(po("nn_adaptive_avg_pool3d"), nn_adaptive_avg_pool3d, exclude = "num_features") + expect_paramtest(res) +}) + +sampler_adaptive_avg_pool = function(dim, batch = TRUE) { + list( + shape_in = sample(20:25, size = dim + 1 + as.integer(batch), replace = TRUE), + conv_dim = dim, + output_size = sample(c(1, dim), size = 1) + ) +} + +test_that("adaptive_avg_output_shape works when there is a batch dimension", { + for (dim in 1:3) { + testcase = sampler_adaptive_avg_pool(dim) + mg = switch(dim, + nn_adaptive_avg_pool1d, + nn_adaptive_avg_pool2d, + nn_adaptive_avg_pool3d + ) + + m = do.call(mg, testcase[names(testcase) %in% formalArgs(mg)]) + outshape = with_no_grad(m(do.call(torch::torch_randn, args = list(unname(testcase$shape_in)))))$shape + expect_true(all(outshape == do.call(adaptive_avg_output_shape, args = testcase))) + } +}) + +test_that("adaptive_avg_output_shape works when there is no batch dimension", { + for (dim in 1:3) { + testcase = sampler_adaptive_avg_pool(dim, batch = FALSE) + mg = switch(dim, + nn_adaptive_avg_pool1d, + nn_adaptive_avg_pool2d, + nn_adaptive_avg_pool3d + ) + m = do.call(mg, testcase[names(testcase) %in% formalArgs(mg)]) + outshape = with_no_grad(m(do.call(torch::torch_randn, args = list(unname(testcase$shape_in)))))$shape + expect_warning(shape <<- do.call(adaptive_avg_output_shape, args = testcase), regexp = "batch dimension") + expect_true(all(outshape == shape)) + } +})