The table below shows all loss functions that are available in mlr3torch.

library(data.table)
library(mlr3torch)
content = as.data.table(mlr3torch::mlr3torch_losses)[, c("key", "label", "task_types")]
content$key = sapply(content$key, function(key) sprintf("[%s](https://torch.mlverse.org/docs/reference/%s)", key, gsub("torch::", "", t_loss(key)$man)))
names(content) = c("Key", "Label", "Task Type")
knitr::kable(content)


mlr-org/mlr3torch documentation built on April 17, 2025, 8:22 p.m.