local_device {torch}R Documentation

Device contexts

Description

Device contexts

Usage

local_device(device, ..., .env = parent.frame())

with_device(code, ..., device)

Arguments

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.

Functions


[Package torch version 0.13.0 Index]