local_device | R Documentation |
Device contexts
local_device(device, ..., .env = parent.frame())
with_device(code, ..., device)
device |
A torch device to be used by default when creating new tensors. |
... |
currently unused. |
.env |
The environment to use for scoping. |
code |
The code to be evaluated in the modified environment. |
with_device()
: Modifies the default device for the selected context.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.