pub trait ToDevice<E: Dtype, D1: Device<E>, D2: Device<E>>: TensorCollection<E, D1> {
// Provided methods
fn try_to_device(&self, device: &D2) -> Result<Self::To<E, D2>, D2::Err> { ... }
fn to_device(&self, device: &D2) -> Self::To<E, D2> { ... }
}
Expand description
Something that can be copied to another Device
.
Provided Methods§
sourcefn try_to_device(&self, device: &D2) -> Result<Self::To<E, D2>, D2::Err>
fn try_to_device(&self, device: &D2) -> Result<Self::To<E, D2>, D2::Err>
Fallible version of ToDevice::to_device