torch: Tensors and Neural Networks with 'GPU' Acceleration

Provides functionality to define and train neural networks similar to 'PyTorch' by Paszke et al (2019) <arXiv:1912.01703> but written entirely in R using the 'libtorch' library. Also supports low-level tensor operations and 'GPU' acceleration.

Version: 0.2.1
Imports: Rcpp, R6, withr, rlang, methods, utils, stats, bit64, magrittr, tools, coro, callr, cli
LinkingTo: Rcpp
Suggests: testthat (≥ 3.0.0), covr, knitr, rmarkdown, glue, palmerpenguins
Published: 2021-01-05
Author: Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], RStudio [cph]
Maintainer: Daniel Falbel <daniel at>
License: MIT + file LICENSE
NeedsCompilation: yes
SystemRequirements: C++11, LibTorch (
Materials: README NEWS
CRAN checks: torch results


Reference manual: torch.pdf
Vignettes: Extending Autograd
Indexing tensors
Loading data
Creating tensors
Using autograd
Package source: torch_0.2.1.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release: torch_0.2.1.tgz, r-oldrel: torch_0.2.1.tgz
Old sources: torch archive

Reverse dependencies:

Reverse imports: tabnet, torchaudio, torchdatasets, torchvision
Reverse suggests: targets


Please use the canonical form to link to this page.