accelerator: Create an accelerator

View source: R/accelerator.R

acceleratorR Documentation

Create an accelerator

Description

Create an accelerator

Usage

accelerator(
  device_placement = TRUE,
  cpu = FALSE,
  cuda_index = torch::cuda_current_device()
)

Arguments

device_placement

(logical) whether the accelerator object should handle device placement. Default: TRUE

cpu

(logical) whether the training procedure should run on the CPU.

cuda_index

(integer) index of the CUDA device to use if multiple GPUs are available. Default: the result of torch::cuda_current_device().


mlverse/torchlight documentation built on Sept. 19, 2024, 11:22 p.m.