% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ag_device.R
\name{ag_to_device}
\alias{ag_to_device}
\title{Move a tensor to the specified device}
\usage{
ag_to_device(tensor, device)
}
\arguments{
\item{tensor}{An \code{ag_tensor}}

\item{device}{\code{"cpu"} or \code{"gpu"}}
}
\value{
A new \code{ag_tensor} on the target device (or the original if
  already on the target device)
}
\description{
Copies an \code{ag_tensor} to the target device, returning a new tensor.
The original tensor is not modified.
}
