Move the tensor data onto a given device. Args: device: a swig Device converted from CudaGPU or CppCPU or OpenclGPU
(self, device)
| 310 | return self |
| 311 | |
| 312 | def to_device(self, device): |
| 313 | '''Move the tensor data onto a given device. |
| 314 | |
| 315 | Args: |
| 316 | device: a swig Device converted from CudaGPU or CppCPU or OpenclGPU |
| 317 | ''' |
| 318 | self.data.ToDevice(device) |
| 319 | self.device = device |
| 320 | |
| 321 | def to_host(self): |
| 322 | '''Move the tensor data onto the default host CppCPU device. |