R/device.R
local_device.Rd
Device contexts
local_device(device, ..., .env = parent.frame()) with_device(code, ..., device)
A torch device to be used by default when creating new tensors.
currently unused.
The environment to use for scoping.
The code to be evaluated in the modified environment.
with_device(): Modifies the default device for the selected context.
with_device()