|
| template<typename DataType > |
| torch::Tensor | LibtorchUtils::vectorToTensorCopy (const std::vector< DataType > &vector, c10::IntArrayRef sizes) |
| | Utility function that creates an owning tensor copy of a standard vector. More...
|
| |
| template torch::Tensor | LibtorchUtils::vectorToTensorCopy< Real > (const std::vector< Real > &vector, c10::IntArrayRef sizes) |
| |
| template<typename DataType > |
| void | LibtorchUtils::vectorToTensor (const std::vector< DataType > &vector, torch::Tensor &tensor, const bool detach=false) |
| | Utility function that converts a standard vector to a torch::Tensor. More...
|
| |
| template void | LibtorchUtils::vectorToTensor< Real > (const std::vector< Real > &vector, torch::Tensor &tensor, const bool detach) |
| |
| template<typename DataType > |
| torch::Tensor | LibtorchUtils::vectorToTensorView (std::vector< DataType > &vector, c10::IntArrayRef sizes) |
| | Utility function that creates a non-owning tensor view of a standard vector. More...
|
| |
| template torch::Tensor | LibtorchUtils::vectorToTensorView< Real > (std::vector< Real > &vector, c10::IntArrayRef sizes) |
| |
| void | LibtorchUtils::moveToLibtorchDevice (torch::Tensor &tensor, const torch::DeviceType device_type) |
| | Move a tensor to the configured libtorch device. More...
|
| |
| torch::Tensor | LibtorchUtils::toCPUContiguous (const torch::Tensor &tensor) |
| | Return a detached contiguous CPU copy of a tensor. More...
|
| |
| template<typename DataType > |
| void | LibtorchUtils::tensorToVector (torch::Tensor &tensor, std::vector< DataType > &vector) |
| | Utility function that converts a torch::Tensor to a standard vector. More...
|
| |
| template void | LibtorchUtils::tensorToVector< Real > (torch::Tensor &tensor, std::vector< Real > &vector) |
| |