% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/device.R
\name{local_device}
\alias{local_device}
\alias{with_device}
\title{Device contexts}
\usage{
local_device(device, ..., .env = parent.frame())

with_device(code, ..., device)
}
\arguments{
\item{device}{A torch device to be used by default when creating new tensors.}

\item{...}{currently unused.}

\item{.env}{The environment to use for scoping.}

\item{code}{The code to be evaluated in the modified environment.}
}
\description{
Device contexts
}
\section{Functions}{
\itemize{
\item \code{with_device()}: Modifies the default device for the selected context.

}}
