Learn R Programming

ggmlR (version 0.6.1)

ag_to_device: Move a tensor to the specified device

Description

Copies an ag_tensor to the target device, returning a new tensor. The original tensor is not modified.

Usage

ag_to_device(tensor, device)

Value

A new ag_tensor on the target device (or the original if already on the target device)

Arguments

tensor

An ag_tensor

device

"cpu" or "gpu"