# mlr3torch Package website: [release](https://mlr3torch.mlr-org.com/) \| [dev](https://mlr3torch.mlr-org.com/dev/) Deep Learning with torch and mlr3. ## Installation ``` r # Install from CRAN install.packages("mlr3torch") # Install the development version from GitHub: pak::pak("mlr-org/mlr3torch") ``` Afterwards, you also need to run the command below: ``` r torch::install_torch() ``` More information about installing `torch` can be found [here](https://torch.mlverse.org/docs/articles/installation.html). ## What is mlr3torch? `mlr3torch` is a deep learning framework for the [`mlr3`](https://mlr-org.com) ecosystem built on top of [`torch`](https://torch.mlverse.org/). It allows to easily build, train and evaluate deep learning models in a few lines of codes, without needing to worry about low-level details. Off-the-shelf learners are readily available, but custom architectures can be defined by connecting `PipeOpTorch` operators in an [`mlr3pipelines::Graph`](https://mlr3pipelines.mlr-org.com/reference/Graph.html). Using predefined learners such as a simple multi layer perceptron (MLP) works just like any other mlr3 `Learner`. ``` r library(mlr3torch) learner_mlp = lrn("classif.mlp", # defining network parameters activation = nn_relu, neurons = c(20, 20), # training parameters batch_size = 16, epochs = 50, device = "cpu", # Proportion of data to use for validation validate = 0.3, # Defining the optimizer, loss, and callbacks optimizer = t_opt("adam", lr = 0.1), loss = t_loss("cross_entropy"), callbacks = t_clbk("history"), # this saves the history in the learner # Measures to track measures_valid = msrs(c("classif.logloss", "classif.ce")), measures_train = msrs(c("classif.acc")), # predict type (required by logloss) predict_type = "prob" ) ``` Below, we train this learner on the sonar example task: ``` r learner_mlp$train(tsk("sonar")) ``` Next, we construct the same architecture using `PipeOpTorch` objects. The first pipeop – a `PipeOpTorchIngress` – defines the entrypoint of the network. All subsequent pipeops define the neural network layers. ``` r architecture = po("torch_ingress_num") %>>% po("nn_linear", out_features = 20) %>>% po("nn_relu") %>>% po("nn_head") ``` To turn this into a learner, we configure the loss, optimizer, callbacks as well as the training arguments. ``` r graph_mlp = architecture %>>% po("torch_loss", loss = t_loss("cross_entropy")) %>>% po("torch_optimizer", optimizer = t_opt("adam", lr = 0.1)) %>>% po("torch_callbacks", callbacks = t_clbk("history")) %>>% po("torch_model_classif", batch_size = 16, epochs = 50, device = "cpu") graph_lrn = as_learner(graph_mlp) ``` To work with generic tensors, the `lazy_tensor` type can be used. It wraps a [`torch::dataset`](https://torch.mlverse.org/docs/reference/dataset.html), but allows to preprocess the data (lazily) using `PipeOp` objects. Below, we flatten the MNIST task, so we can then train a multi-layer perceptron on it. Note that this does *not* transform the data in-memory, but is only applied when the data is actually loaded. ``` r # load the predefined mnist task mnist = tsk("mnist") mnist$head(3L) #> label image #> #> 1: 5 #> 2: 0 #> 3: 4 # Flatten the images flattener = po("trafo_reshape", shape = c(-1, 28 * 28)) mnist_flat = flattener$train(list(mnist))[[1L]] mnist_flat$head(3L) #> label image #> #> 1: 5 #> 2: 0 #> 3: 4 ``` To actually access the tensors, we can call [`materialize()`](https://mlr3torch.mlr-org.com/reference/materialize.md). We only show a slice of the resulting tensor for readability: ``` r materialize( mnist_flat$data(1:2, cols = "image")[[1L]], rbind = TRUE )[1:2, 1:4] #> torch_tensor #> 0 0 0 0 #> 0 0 0 0 #> [ CPUFloatType{2,4} ] ``` Below, we define a more complex architecture that has one single input which is a `lazy_tensor`. For that, we first define a single residual block: ``` r layer = list( po("nop"), po("nn_linear", out_features = 50L) %>>% po("nn_dropout") %>>% po("nn_relu") ) %>>% po("nn_merge_sum") ``` Next, we create a neural network that takes as input a `lazy_tensor` (`po("torch_ingress_ltnsr")`). It first applies a linear layer and then repeats the above layer using the special `PipeOpTorchBlock`, followed by the network’s head. After that, we configure the loss, optimizer and the training parameters. Note that `po("nn_linear_0")` is equivalent to `po("nn_linear", id = "nn_linear_0")` and we need this here to avoid ID clashes with the linear layer from `po("nn_block")`. ``` r deep_network = po("torch_ingress_ltnsr") %>>% po("nn_linear", out_features = 50L) %>>% po("nn_block", layer, n_blocks = 5L) %>>% po("nn_head") %>>% po("torch_loss", loss = t_loss("cross_entropy")) %>>% po("torch_optimizer", optimizer = t_opt("adam")) %>>% po("torch_model_classif", epochs = 100L, batch_size = 32 ) ``` Next, we prepend the preprocessing step that flattens the images so we can directly apply this learner to the unflattened MNIST task. ``` r deep_learner = as_learner( flattener %>>% deep_network ) deep_learner$id = "deep_network" ``` In order to keep track of the performance during training, we use 20% of the data and evaluate it using classification accuracy. ``` r set_validate(deep_learner, 0.2) deep_learner$param_set$set_values( torch_model_classif.measures_valid = msr("classif.acc") ) ``` All that is left is to train the learner: ``` r deep_learner$train(mnist) ``` ## Feature Overview - Off-the-shelf architectures are readily available as [`mlr3::Learner`](https://mlr3.mlr-org.com/reference/Learner.html)s. - Currently, supervised regression and classification is supported. - Custom learners can be defined using the `Graph` language from `mlr3pipelines`. - The package supports tabular data, as well as generic tensors via the `lazy_tensor` type. - Multi-modal data can be handled conveniently, as `lazy_tensor` objects can be stored alongside tabular data. - It is possible to customize the training process via (predefined or custom) callbacks. - The package is fully integrated into the `mlr3` ecosystem. - Neural network architectures, as well as their hyperparameters can be easily tuned via `mlr3tuning` and friends. ## Documentation - Start by reading one of the vignettes on the package website! - There is a [course on `(mlr3)torch`](https://mlr-org.github.io/mlr3torch-course/). - You can check out our [presentation from UseR 2024](https://sebffischer.github.io/mlr3torch-UseR-2024/#/). ## Contributing: - To run the tests one needs to set the environment variable `TEST_TORCH = 1`, e.g. by adding it to `.Renviron`. ## Acknowledgements - Without the great R package `torch` none of this would have been possible. - The names for the callback stages are taken from [luz](https://mlverse.github.io/luz/), another high-level deep learning framework for R `torch`. - Building neural networks using `PipeOpTorch` operators is inspired by [keras](https://keras.io/). - This R package is developed as part of the [Mathematical Research Data Initiative](https://www.mardi4nfdi.de/about/mission). ## Bugs, Questions, Feedback *mlr3torch* is a free and open source software project that encourages participation and feedback. If you have any issues, questions, suggestions or feedback, please do not hesitate to open an “issue” about it on the GitHub page! In case of problems / bugs, it is often helpful if you provide a “minimum working example” that showcases the behaviour (but don’t worry about this if the bug is obvious). Please understand that the resources of the project are limited: response may sometimes be delayed by a few days, and some feature suggestions may be rejected if they are deemed too tangential to the vision behind the project. # Package index ## Package - [`mlr3torch`](https://mlr3torch.mlr-org.com/reference/mlr3torch-package.md) [`mlr3torch-package`](https://mlr3torch.mlr-org.com/reference/mlr3torch-package.md) : mlr3torch: Deep Learning with 'mlr3' ## Learners - [`mlr_learners.ft_transformer`](https://mlr3torch.mlr-org.com/reference/mlr_learners.ft_transformer.md) [`LearnerTorchFTTransformer`](https://mlr3torch.mlr-org.com/reference/mlr_learners.ft_transformer.md) : FT-Transformer - [`mlr_learners.mlp`](https://mlr3torch.mlr-org.com/reference/mlr_learners.mlp.md) [`LearnerTorchMLP`](https://mlr3torch.mlr-org.com/reference/mlr_learners.mlp.md) : Multi Layer Perceptron - [`mlr_learners.module`](https://mlr3torch.mlr-org.com/reference/mlr_learners.module.md) [`LearnerTorchModule`](https://mlr3torch.mlr-org.com/reference/mlr_learners.module.md) : Learner Torch Module - [`mlr_learners.tab_resnet`](https://mlr3torch.mlr-org.com/reference/mlr_learners.tab_resnet.md) [`LearnerTorchTabResNet`](https://mlr3torch.mlr-org.com/reference/mlr_learners.tab_resnet.md) : Tabular ResNet - [`mlr_learners.torch_featureless`](https://mlr3torch.mlr-org.com/reference/mlr_learners.torch_featureless.md) [`LearnerTorchFeatureless`](https://mlr3torch.mlr-org.com/reference/mlr_learners.torch_featureless.md) : Featureless Torch Learner - [`mlr_learners.torchvision`](https://mlr3torch.mlr-org.com/reference/mlr_learners.torchvision.md) [`LearnerTorchVision`](https://mlr3torch.mlr-org.com/reference/mlr_learners.torchvision.md) : AlexNet Image Classifier - [`mlr_learners_torch`](https://mlr3torch.mlr-org.com/reference/mlr_learners_torch.md) [`LearnerTorch`](https://mlr3torch.mlr-org.com/reference/mlr_learners_torch.md) : Base Class for Torch Learners - [`mlr_learners_torch_image`](https://mlr3torch.mlr-org.com/reference/mlr_learners_torch_image.md) [`LearnerTorchImage`](https://mlr3torch.mlr-org.com/reference/mlr_learners_torch_image.md) : Image Learner - [`mlr_learners_torch_model`](https://mlr3torch.mlr-org.com/reference/mlr_learners_torch_model.md) [`LearnerTorchModel`](https://mlr3torch.mlr-org.com/reference/mlr_learners_torch_model.md) : Learner Torch Model ## Tasks - [`mlr_tasks_cifar`](https://mlr3torch.mlr-org.com/reference/mlr_tasks_cifar.md) [`mlr_tasks_cifar10`](https://mlr3torch.mlr-org.com/reference/mlr_tasks_cifar.md) [`mlr_tasks_cifar100`](https://mlr3torch.mlr-org.com/reference/mlr_tasks_cifar.md) : CIFAR Classification Tasks - [`mlr_tasks_lazy_iris`](https://mlr3torch.mlr-org.com/reference/mlr_tasks_lazy_iris.md) : Iris Classification Task - [`mlr_tasks_melanoma`](https://mlr3torch.mlr-org.com/reference/mlr_tasks_melanoma.md) : Melanoma Image classification - [`mlr_tasks_mnist`](https://mlr3torch.mlr-org.com/reference/mlr_tasks_mnist.md) : MNIST Image classification - [`mlr_tasks_tiny_imagenet`](https://mlr3torch.mlr-org.com/reference/mlr_tasks_tiny_imagenet.md) : Tiny ImageNet Classification Task - [`mlr_backends_lazy`](https://mlr3torch.mlr-org.com/reference/mlr_backends_lazy.md) [`DataBackendLazy`](https://mlr3torch.mlr-org.com/reference/mlr_backends_lazy.md) : Lazy Data Backend ## Network Building Blocks - [`ModelDescriptor()`](https://mlr3torch.mlr-org.com/reference/ModelDescriptor.md) : Represent a Model with Meta-Info - [`model_descriptor_to_learner()`](https://mlr3torch.mlr-org.com/reference/model_descriptor_to_learner.md) : Create a Torch Learner from a ModelDescriptor - [`model_descriptor_to_module()`](https://mlr3torch.mlr-org.com/reference/model_descriptor_to_module.md) : Create a nn_graph from ModelDescriptor - [`model_descriptor_union()`](https://mlr3torch.mlr-org.com/reference/model_descriptor_union.md) : Union of ModelDescriptors - [`mlr_pipeops_module`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_module.md) [`PipeOpModule`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_module.md) : Class for Torch Module Wrappers - [`TorchIngressToken()`](https://mlr3torch.mlr-org.com/reference/TorchIngressToken.md) : Torch Ingress Token - [`ingress_categ()`](https://mlr3torch.mlr-org.com/reference/ingress_categ.md) : Ingress Token for Categorical Features - [`ingress_ltnsr()`](https://mlr3torch.mlr-org.com/reference/ingress_ltnsr.md) : Ingress Token for Lazy Tensor Feature - [`ingress_num()`](https://mlr3torch.mlr-org.com/reference/ingress_num.md) : Ingress Token for Numeric Features - [`mlr_pipeops_torch`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch.md) [`PipeOpTorch`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch.md) : Base Class for Torch Module Constructor Wrappers - [`mlr_pipeops_torch_ingress`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_ingress.md) [`PipeOpTorchIngress`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_ingress.md) : Entrypoint to Torch Network - [`mlr_pipeops_torch_model`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_model.md) [`PipeOpTorchModel`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_model.md) : PipeOp Torch Model - [`mlr_pipeops_torch_model_classif`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_model_classif.md) [`PipeOpTorchModelClassif`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_model_classif.md) : PipeOp Torch Classifier - [`mlr_pipeops_torch_model_regr`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_model_regr.md) [`PipeOpTorchModelRegr`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_model_regr.md) : Torch Regression Model - [`batchgetter_categ()`](https://mlr3torch.mlr-org.com/reference/batchgetter_categ.md) : Batchgetter for Categorical data - [`batchgetter_num()`](https://mlr3torch.mlr-org.com/reference/batchgetter_num.md) : Batchgetter for Numeric Data - [`mlr_pipeops_torch_ingress_categ`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_ingress_categ.md) [`PipeOpTorchIngressCategorical`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_ingress_categ.md) : Torch Entry Point for Categorical Features - [`mlr_pipeops_torch_ingress_ltnsr`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_ingress_ltnsr.md) [`PipeOpTorchIngressLazyTensor`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_ingress_ltnsr.md) : Ingress for Lazy Tensor - [`mlr_pipeops_torch_ingress_num`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_ingress_num.md) [`PipeOpTorchIngressNumeric`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_ingress_num.md) : Torch Entry Point for Numeric Features - [`mlr_pipeops_torch_loss`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_loss.md) [`PipeOpTorchLoss`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_loss.md) : Loss Configuration - [`mlr_pipeops_torch_optimizer`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_optimizer.md) [`PipeOpTorchOptimizer`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_optimizer.md) : Optimizer Configuration - [`mlr_pipeops_torch_callbacks`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_callbacks.md) [`PipeOpTorchCallbacks`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_callbacks.md) : Callback Configuration ## Network Layers - [`mlr_pipeops_nn_adaptive_avg_pool1d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_adaptive_avg_pool1d.md) [`PipeOpTorchAdaptiveAvgPool1D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_adaptive_avg_pool1d.md) : 1D Adaptive Average Pooling - [`mlr_pipeops_nn_adaptive_avg_pool2d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_adaptive_avg_pool2d.md) [`PipeOpTorchAdaptiveAvgPool2D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_adaptive_avg_pool2d.md) : 2D Adaptive Average Pooling - [`mlr_pipeops_nn_adaptive_avg_pool3d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_adaptive_avg_pool3d.md) [`PipeOpTorchAdaptiveAvgPool3D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_adaptive_avg_pool3d.md) : 3D Adaptive Average Pooling - [`mlr_pipeops_nn_avg_pool1d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_avg_pool1d.md) [`PipeOpTorchAvgPool1D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_avg_pool1d.md) : 1D Average Pooling - [`mlr_pipeops_nn_avg_pool2d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_avg_pool2d.md) [`PipeOpTorchAvgPool2D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_avg_pool2d.md) : 2D Average Pooling - [`mlr_pipeops_nn_avg_pool3d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_avg_pool3d.md) [`PipeOpTorchAvgPool3D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_avg_pool3d.md) : 3D Average Pooling - [`mlr_pipeops_nn_batch_norm1d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_batch_norm1d.md) [`PipeOpTorchBatchNorm1D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_batch_norm1d.md) : 1D Batch Normalization - [`mlr_pipeops_nn_batch_norm2d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_batch_norm2d.md) [`PipeOpTorchBatchNorm2D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_batch_norm2d.md) : 2D Batch Normalization - [`mlr_pipeops_nn_batch_norm3d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_batch_norm3d.md) [`PipeOpTorchBatchNorm3D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_batch_norm3d.md) : 3D Batch Normalization - [`mlr_pipeops_nn_block`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_block.md) [`PipeOpTorchBlock`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_block.md) : Block Repetition - [`mlr_pipeops_nn_celu`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_celu.md) [`PipeOpTorchCELU`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_celu.md) : CELU Activation Function - [`mlr_pipeops_nn_conv1d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv1d.md) [`PipeOpTorchConv1D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv1d.md) : 1D Convolution - [`mlr_pipeops_nn_conv2d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv2d.md) [`PipeOpTorchConv2D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv2d.md) : 2D Convolution - [`mlr_pipeops_nn_conv3d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv3d.md) [`PipeOpTorchConv3D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv3d.md) : 3D Convolution - [`mlr_pipeops_nn_conv_transpose1d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv_transpose1d.md) [`PipeOpTorchConvTranspose1D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv_transpose1d.md) : Transpose 1D Convolution - [`mlr_pipeops_nn_conv_transpose2d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv_transpose2d.md) [`PipeOpTorchConvTranspose2D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv_transpose2d.md) : Transpose 2D Convolution - [`mlr_pipeops_nn_conv_transpose3d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv_transpose3d.md) [`PipeOpTorchConvTranspose3D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_conv_transpose3d.md) : Transpose 3D Convolution - [`mlr_pipeops_nn_dropout`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_dropout.md) [`PipeOpTorchDropout`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_dropout.md) : Dropout - [`mlr_pipeops_nn_elu`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_elu.md) [`PipeOpTorchELU`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_elu.md) : ELU Activation Function - [`mlr_pipeops_nn_flatten`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_flatten.md) [`PipeOpTorchFlatten`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_flatten.md) : Flattens a Tensor - [`mlr_pipeops_nn_fn`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_fn.md) [`PipeOpTorchFn`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_fn.md) : Custom Function - [`mlr_pipeops_nn_ft_cls`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_ft_cls.md) [`PipeOpTorchFTCLS`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_ft_cls.md) : CLS Token for FT-Transformer - [`mlr_pipeops_nn_ft_transformer_block`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_ft_transformer_block.md) [`PipeOpTorchFTTransformerBlock`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_ft_transformer_block.md) : Single Transformer Block for the FT-Transformer - [`mlr_pipeops_nn_geglu`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_geglu.md) [`PipeOpTorchGeGLU`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_geglu.md) : GeGLU Activation Function - [`mlr_pipeops_nn_gelu`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_gelu.md) [`PipeOpTorchGELU`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_gelu.md) : GELU Activation Function - [`mlr_pipeops_nn_glu`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_glu.md) [`PipeOpTorchGLU`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_glu.md) : GLU Activation Function - [`mlr_pipeops_nn_hardshrink`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_hardshrink.md) [`PipeOpTorchHardShrink`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_hardshrink.md) : Hard Shrink Activation Function - [`mlr_pipeops_nn_hardsigmoid`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_hardsigmoid.md) [`PipeOpTorchHardSigmoid`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_hardsigmoid.md) : Hard Sigmoid Activation Function - [`mlr_pipeops_nn_hardtanh`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_hardtanh.md) [`PipeOpTorchHardTanh`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_hardtanh.md) : Hard Tanh Activation Function - [`mlr_pipeops_nn_head`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_head.md) [`PipeOpTorchHead`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_head.md) : Output Head - [`mlr_pipeops_nn_identity`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_identity.md) [`PipeOpTorchIdentity`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_identity.md) : Identity Layer - [`mlr_pipeops_nn_layer_norm`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_layer_norm.md) [`PipeOpTorchLayerNorm`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_layer_norm.md) : Layer Normalization - [`mlr_pipeops_nn_leaky_relu`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_leaky_relu.md) [`PipeOpTorchLeakyReLU`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_leaky_relu.md) : Leaky ReLU Activation Function - [`mlr_pipeops_nn_linear`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_linear.md) [`PipeOpTorchLinear`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_linear.md) : Linear Layer - [`mlr_pipeops_nn_log_sigmoid`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_log_sigmoid.md) [`PipeOpTorchLogSigmoid`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_log_sigmoid.md) : Log Sigmoid Activation Function - [`mlr_pipeops_nn_max_pool1d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_max_pool1d.md) [`PipeOpTorchMaxPool1D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_max_pool1d.md) : 1D Max Pooling - [`mlr_pipeops_nn_max_pool2d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_max_pool2d.md) [`PipeOpTorchMaxPool2D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_max_pool2d.md) : 2D Max Pooling - [`mlr_pipeops_nn_max_pool3d`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_max_pool3d.md) [`PipeOpTorchMaxPool3D`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_max_pool3d.md) : 3D Max Pooling - [`mlr_pipeops_nn_merge`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_merge.md) [`PipeOpTorchMerge`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_merge.md) : Merge Operation - [`mlr_pipeops_nn_merge_cat`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_merge_cat.md) [`PipeOpTorchMergeCat`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_merge_cat.md) : Merge by Concatenation - [`mlr_pipeops_nn_merge_prod`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_merge_prod.md) [`PipeOpTorchMergeProd`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_merge_prod.md) : Merge by Product - [`mlr_pipeops_nn_merge_sum`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_merge_sum.md) [`PipeOpTorchMergeSum`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_merge_sum.md) : Merge by Summation - [`mlr_pipeops_nn_prelu`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_prelu.md) [`PipeOpTorchPReLU`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_prelu.md) : PReLU Activation Function - [`mlr_pipeops_nn_reglu`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_reglu.md) [`PipeOpTorchReGLU`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_reglu.md) : ReGLU Activation Function - [`mlr_pipeops_nn_relu`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_relu.md) [`PipeOpTorchReLU`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_relu.md) : ReLU Activation Function - [`mlr_pipeops_nn_relu6`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_relu6.md) [`PipeOpTorchReLU6`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_relu6.md) : ReLU6 Activation Function - [`mlr_pipeops_nn_reshape`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_reshape.md) [`PipeOpTorchReshape`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_reshape.md) : Reshape a Tensor - [`mlr_pipeops_nn_rrelu`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_rrelu.md) [`PipeOpTorchRReLU`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_rrelu.md) : RReLU Activation Function - [`mlr_pipeops_nn_selu`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_selu.md) [`PipeOpTorchSELU`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_selu.md) : SELU Activation Function - [`mlr_pipeops_nn_sigmoid`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_sigmoid.md) [`PipeOpTorchSigmoid`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_sigmoid.md) : Sigmoid Activation Function - [`mlr_pipeops_nn_softmax`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_softmax.md) [`PipeOpTorchSoftmax`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_softmax.md) : Softmax - [`mlr_pipeops_nn_softplus`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_softplus.md) [`PipeOpTorchSoftPlus`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_softplus.md) : SoftPlus Activation Function - [`mlr_pipeops_nn_softshrink`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_softshrink.md) [`PipeOpTorchSoftShrink`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_softshrink.md) : Soft Shrink Activation Function - [`mlr_pipeops_nn_softsign`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_softsign.md) [`PipeOpTorchSoftSign`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_softsign.md) : SoftSign Activation Function - [`mlr_pipeops_nn_squeeze`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_squeeze.md) [`PipeOpTorchSqueeze`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_squeeze.md) : Squeeze a Tensor - [`mlr_pipeops_nn_tanh`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_tanh.md) [`PipeOpTorchTanh`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_tanh.md) : Tanh Activation Function - [`mlr_pipeops_nn_tanhshrink`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_tanhshrink.md) [`PipeOpTorchTanhShrink`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_tanhshrink.md) : Tanh Shrink Activation Function - [`mlr_pipeops_nn_threshold`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_threshold.md) [`PipeOpTorchThreshold`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_threshold.md) : Treshold Activation Function - [`mlr_pipeops_nn_tokenizer_categ`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_tokenizer_categ.md) [`PipeOpTorchTokenizerCateg`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_tokenizer_categ.md) : Categorical Tokenizer - [`mlr_pipeops_nn_tokenizer_num`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_tokenizer_num.md) [`PipeOpTorchTokenizerNum`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_tokenizer_num.md) : Numeric Tokenizer - [`mlr_pipeops_nn_unsqueeze`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_unsqueeze.md) [`PipeOpTorchUnsqueeze`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_nn_unsqueeze.md) : Unqueeze a Tensor ## Preprocessing & Augmentation - [`mlr_pipeops_preproc_torch`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_preproc_torch.md) [`PipeOpTaskPreprocTorch`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_preproc_torch.md) : Base Class for Lazy Tensor Preprocessing - [`pipeop_preproc_torch()`](https://mlr3torch.mlr-org.com/reference/pipeop_preproc_torch.md) : Create Torch Preprocessing PipeOps - [`mlr_pipeops_trafo_nop`](https://mlr3torch.mlr-org.com/reference/PipeOpPreprocTorchTrafoNop.md) [`PipeOpPreprocTorchTrafoNop`](https://mlr3torch.mlr-org.com/reference/PipeOpPreprocTorchTrafoNop.md) : No Transformation - [`mlr_pipeops_trafo_reshape`](https://mlr3torch.mlr-org.com/reference/PipeOpPreprocTorchTrafoReshape.md) [`PipeOpPreprocTorchTrafoReshape`](https://mlr3torch.mlr-org.com/reference/PipeOpPreprocTorchTrafoReshape.md) : Reshaping Transformation - [`mlr_pipeops_augment_center_crop`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_center_crop.md) [`PipeOpPreprocTorchAugmentCenterCrop`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_center_crop.md) : Center Crop Augmentation - [`mlr_pipeops_augment_color_jitter`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_color_jitter.md) [`PipeOpPreprocTorchAugmentColorJitter`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_color_jitter.md) : Color Jitter Augmentation - [`mlr_pipeops_augment_crop`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_crop.md) [`PipeOpPreprocTorchAugmentCrop`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_crop.md) : Crop Augmentation - [`mlr_pipeops_augment_hflip`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_hflip.md) [`PipeOpPreprocTorchAugmentHflip`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_hflip.md) : Horizontal Flip Augmentation - [`mlr_pipeops_augment_random_affine`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_affine.md) [`PipeOpPreprocTorchAugmentRandomAffine`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_affine.md) : Random Affine Augmentation - [`mlr_pipeops_augment_random_choice`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_choice.md) [`PipeOpPreprocTorchAugmentRandomChoice`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_choice.md) : Random Choice Augmentation - [`mlr_pipeops_augment_random_crop`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_crop.md) [`PipeOpPreprocTorchAugmentRandomCrop`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_crop.md) : Random Crop Augmentation - [`mlr_pipeops_augment_random_horizontal_flip`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_horizontal_flip.md) [`PipeOpPreprocTorchAugmentRandomHorizontalFlip`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_horizontal_flip.md) : Random Horizontal Flip Augmentation - [`mlr_pipeops_augment_random_order`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_order.md) [`PipeOpPreprocTorchAugmentRandomOrder`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_order.md) : Random Order Augmentation - [`mlr_pipeops_augment_random_resized_crop`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_resized_crop.md) [`PipeOpPreprocTorchAugmentRandomResizedCrop`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_resized_crop.md) : Random Resized Crop Augmentation - [`mlr_pipeops_augment_random_vertical_flip`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_vertical_flip.md) [`PipeOpPreprocTorchAugmentRandomVerticalFlip`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_random_vertical_flip.md) : Random Vertical Flip Augmentation - [`mlr_pipeops_augment_resized_crop`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_resized_crop.md) [`PipeOpPreprocTorchAugmentResizedCrop`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_resized_crop.md) : Resized Crop Augmentation - [`mlr_pipeops_augment_rotate`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_rotate.md) [`PipeOpPreprocTorchAugmentRotate`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_rotate.md) : Rotate Augmentation - [`mlr_pipeops_augment_vflip`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_vflip.md) [`PipeOpPreprocTorchAugmentVflip`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_augment_vflip.md) : Vertical Flip Augmentation - [`mlr_pipeops_trafo_adjust_brightness`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_adjust_brightness.md) [`PipeOpPreprocTorchTrafoAdjustBrightness`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_adjust_brightness.md) : Adjust Brightness Transformation - [`mlr_pipeops_trafo_adjust_gamma`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_adjust_gamma.md) [`PipeOpPreprocTorchTrafoAdjustGamma`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_adjust_gamma.md) : Adjust Gamma Transformation - [`mlr_pipeops_trafo_adjust_hue`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_adjust_hue.md) [`PipeOpPreprocTorchTrafoAdjustHue`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_adjust_hue.md) : Adjust Hue Transformation - [`mlr_pipeops_trafo_adjust_saturation`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_adjust_saturation.md) [`PipeOpPreprocTorchTrafoAdjustSaturation`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_adjust_saturation.md) : Adjust Saturation Transformation - [`mlr_pipeops_trafo_grayscale`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_grayscale.md) [`PipeOpPreprocTorchTrafoGrayscale`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_grayscale.md) : Grayscale Transformation - [`mlr_pipeops_trafo_normalize`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_normalize.md) [`PipeOpPreprocTorchTrafoNormalize`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_normalize.md) : Normalization Transformation - [`mlr_pipeops_trafo_pad`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_pad.md) [`PipeOpPreprocTorchTrafoPad`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_pad.md) : Padding Transformation - [`mlr_pipeops_trafo_resize`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_resize.md) [`PipeOpPreprocTorchTrafoResize`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_resize.md) : Resizing Transformation - [`mlr_pipeops_trafo_rgb_to_grayscale`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_rgb_to_grayscale.md) [`PipeOpPreprocTorchTrafoRgbToGrayscale`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_trafo_rgb_to_grayscale.md) : RGB to Grayscale Transformation ## NN Modules - [`nn()`](https://mlr3torch.mlr-org.com/reference/nn.md) : Create a Neural Network Layer - [`nn_ft_cls()`](https://mlr3torch.mlr-org.com/reference/nn_ft_cls.md) : CLS Token for FT-Transformer - [`nn_ft_transformer_block()`](https://mlr3torch.mlr-org.com/reference/nn_ft_transformer_block.md) : Single Transformer Block for FT-Transformer - [`nn_geglu()`](https://mlr3torch.mlr-org.com/reference/nn_geglu.md) : GeGLU Module - [`nn_graph()`](https://mlr3torch.mlr-org.com/reference/nn_graph.md) : Graph Network - [`nn_merge_cat()`](https://mlr3torch.mlr-org.com/reference/nn_merge_cat.md) : Concatenates multiple tensors - [`nn_merge_prod()`](https://mlr3torch.mlr-org.com/reference/nn_merge_prod.md) : Product of multiple tensors - [`nn_merge_sum()`](https://mlr3torch.mlr-org.com/reference/nn_merge_sum.md) : Sum of multiple tensors - [`nn_reglu()`](https://mlr3torch.mlr-org.com/reference/nn_reglu.md) : ReGLU Module - [`nn_reshape()`](https://mlr3torch.mlr-org.com/reference/nn_reshape.md) : Reshape - [`nn_squeeze()`](https://mlr3torch.mlr-org.com/reference/nn_squeeze.md) : Squeeze - [`nn_tokenizer_categ()`](https://mlr3torch.mlr-org.com/reference/nn_tokenizer_categ.md) : Categorical Tokenizer - [`nn_tokenizer_num()`](https://mlr3torch.mlr-org.com/reference/nn_tokenizer_num.md) : Numeric Tokenizer - [`nn_unsqueeze()`](https://mlr3torch.mlr-org.com/reference/nn_unsqueeze.md) : Unsqueeze ## Lazy Tensor - [`lazy_tensor()`](https://mlr3torch.mlr-org.com/reference/lazy_tensor.md) : Create a lazy tensor - [`lazy_shape()`](https://mlr3torch.mlr-org.com/reference/lazy_shape.md) : Shape of Lazy Tensor - [`DataDescriptor`](https://mlr3torch.mlr-org.com/reference/DataDescriptor.md) : Data Descriptor - [`as_lazy_tensor()`](https://mlr3torch.mlr-org.com/reference/as_lazy_tensor.md) : Convert to Lazy Tensor - [`as_data_descriptor()`](https://mlr3torch.mlr-org.com/reference/as_data_descriptor.md) : Convert to Data Descriptor - [`assert_lazy_tensor()`](https://mlr3torch.mlr-org.com/reference/assert_lazy_tensor.md) : Assert Lazy Tensor - [`is_lazy_tensor()`](https://mlr3torch.mlr-org.com/reference/is_lazy_tensor.md) : Check for lazy tensor - [`materialize()`](https://mlr3torch.mlr-org.com/reference/materialize.md) : Materialize Lazy Tensor Columns ## Loss - [`t_loss()`](https://mlr3torch.mlr-org.com/reference/t_loss.md) [`t_losses()`](https://mlr3torch.mlr-org.com/reference/t_loss.md) : Loss Function Quick Access - [`TorchLoss`](https://mlr3torch.mlr-org.com/reference/TorchLoss.md) : Torch Loss - [`mlr_pipeops_torch_loss`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_loss.md) [`PipeOpTorchLoss`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_loss.md) : Loss Configuration - [`as_torch_loss()`](https://mlr3torch.mlr-org.com/reference/as_torch_loss.md) : Convert to TorchLoss - [`mlr3torch_losses`](https://mlr3torch.mlr-org.com/reference/mlr3torch_losses.md) : Loss Functions - [`cross_entropy`](https://mlr3torch.mlr-org.com/reference/cross_entropy.md) : Cross Entropy Loss ## Optimizer - [`t_opt()`](https://mlr3torch.mlr-org.com/reference/t_opt.md) [`t_opts()`](https://mlr3torch.mlr-org.com/reference/t_opt.md) : Optimizers Quick Access - [`TorchLoss`](https://mlr3torch.mlr-org.com/reference/TorchLoss.md) : Torch Loss - [`mlr_pipeops_torch_optimizer`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_optimizer.md) [`PipeOpTorchOptimizer`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_optimizer.md) : Optimizer Configuration - [`as_torch_optimizer()`](https://mlr3torch.mlr-org.com/reference/as_torch_optimizer.md) : Convert to TorchOptimizer - [`mlr3torch_optimizers`](https://mlr3torch.mlr-org.com/reference/mlr3torch_optimizers.md) : Optimizers ## Callbacks - [`callback_set()`](https://mlr3torch.mlr-org.com/reference/callback_set.md) : Create a Set of Callbacks for Torch - [`torch_callback()`](https://mlr3torch.mlr-org.com/reference/torch_callback.md) : Create a Callback Descriptor - [`t_clbk()`](https://mlr3torch.mlr-org.com/reference/t_clbk.md) [`t_clbks()`](https://mlr3torch.mlr-org.com/reference/t_clbk.md) : Sugar Function for Torch Callback - [`TorchCallback`](https://mlr3torch.mlr-org.com/reference/TorchCallback.md) : Torch Callback - [`TorchDescriptor`](https://mlr3torch.mlr-org.com/reference/TorchDescriptor.md) : Base Class for Torch Descriptors - [`TorchIngressToken()`](https://mlr3torch.mlr-org.com/reference/TorchIngressToken.md) : Torch Ingress Token - [`TorchLoss`](https://mlr3torch.mlr-org.com/reference/TorchLoss.md) : Torch Loss - [`TorchOptimizer`](https://mlr3torch.mlr-org.com/reference/TorchOptimizer.md) : Torch Optimizer - [`mlr_callback_set`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.md) [`CallbackSet`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.md) : Base Class for Callbacks - [`mlr_callback_set.checkpoint`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.checkpoint.md) [`CallbackSetCheckpoint`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.checkpoint.md) : Checkpoint Callback - [`mlr_callback_set.history`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.history.md) [`CallbackSetHistory`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.history.md) : History Callback - [`mlr_callback_set.lr_scheduler`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.lr_scheduler.md) [`CallbackSetLRScheduler`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.lr_scheduler.md) : Learning Rate Scheduling Callback - [`mlr_callback_set.lr_scheduler_one_cycle`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.lr_scheduler_one_cycle.md) [`CallbackSetLRSchedulerOneCycle`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.lr_scheduler_one_cycle.md) : OneCycle Learning Rate Scheduling Callback - [`mlr_callback_set.lr_scheduler_reduce_on_plateau`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.lr_scheduler_reduce_on_plateau.md) [`CallbackSetLRSchedulerReduceOnPlateau`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.lr_scheduler_reduce_on_plateau.md) : Reduce On Plateau Learning Rate Scheduler - [`mlr_callback_set.progress`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.progress.md) [`CallbackSetProgress`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.progress.md) : Progress Callback - [`mlr_callback_set.tb`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.tb.md) [`CallbackSetTB`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.tb.md) : TensorBoard Logging Callback - [`mlr_callback_set.unfreeze`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.unfreeze.md) [`CallbackSetUnfreeze`](https://mlr3torch.mlr-org.com/reference/mlr_callback_set.unfreeze.md) : Unfreezing Weights Callback - [`as_torch_callback()`](https://mlr3torch.mlr-org.com/reference/as_torch_callback.md) : Convert to a TorchCallback - [`as_torch_callbacks()`](https://mlr3torch.mlr-org.com/reference/as_torch_callbacks.md) : Convert to a list of Torch Callbacks - [`mlr_pipeops_torch_callbacks`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_callbacks.md) [`PipeOpTorchCallbacks`](https://mlr3torch.mlr-org.com/reference/mlr_pipeops_torch_callbacks.md) : Callback Configuration - [`mlr3torch_callbacks`](https://mlr3torch.mlr-org.com/reference/mlr3torch_callbacks.md) : Dictionary of Torch Callbacks - [`mlr_context_torch`](https://mlr3torch.mlr-org.com/reference/mlr_context_torch.md) [`ContextTorch`](https://mlr3torch.mlr-org.com/reference/mlr_context_torch.md) : Context for Torch Learner - [`as_lr_scheduler()`](https://mlr3torch.mlr-org.com/reference/as_lr_scheduler.md) : Convert to CallbackSetLRScheduler ## Helper - [`TorchDescriptor`](https://mlr3torch.mlr-org.com/reference/TorchDescriptor.md) : Base Class for Torch Descriptors - [`auto_device()`](https://mlr3torch.mlr-org.com/reference/auto_device.md) : Auto Device - [`task_dataset()`](https://mlr3torch.mlr-org.com/reference/task_dataset.md) : Create a Dataset from a Task - [`select_all()`](https://mlr3torch.mlr-org.com/reference/Select.md) [`select_none()`](https://mlr3torch.mlr-org.com/reference/Select.md) [`select_grep()`](https://mlr3torch.mlr-org.com/reference/Select.md) [`select_name()`](https://mlr3torch.mlr-org.com/reference/Select.md) [`select_invert()`](https://mlr3torch.mlr-org.com/reference/Select.md) : Selector Functions for Character Vectors - [`output_dim_for()`](https://mlr3torch.mlr-org.com/reference/output_dim_for.md) : Network Output Dimension - [`infer_shapes()`](https://mlr3torch.mlr-org.com/reference/infer_shapes.md) : Infer Shapes # Articles ### All vignettes - [Callbacks](https://mlr3torch.mlr-org.com/articles/callback_list.md): - [Custom Callbacks](https://mlr3torch.mlr-org.com/articles/callbacks.md): - [Get Started](https://mlr3torch.mlr-org.com/articles/get_started.md): - [Internals](https://mlr3torch.mlr-org.com/articles/internals_pipeop_torch.md): - [Network Layers](https://mlr3torch.mlr-org.com/articles/layer_list.md): - [Lazy Tensor](https://mlr3torch.mlr-org.com/articles/lazy_tensor.md): - [Loss Functions](https://mlr3torch.mlr-org.com/articles/loss_list.md): - [Optimizers](https://mlr3torch.mlr-org.com/articles/optimizer_list.md): - [Defining an Architecture](https://mlr3torch.mlr-org.com/articles/pipeop_torch.md): - [Preprocessing & Augmentation](https://mlr3torch.mlr-org.com/articles/preprocessing_list.md): - [Tabular Learners](https://mlr3torch.mlr-org.com/articles/tabular_learner_list.md): - [Tasks](https://mlr3torch.mlr-org.com/articles/task_list.md): - [Vision Learners](https://mlr3torch.mlr-org.com/articles/vision_learner_list.md):