https://mooseframework.inl.gov
Namespaces | Functions
LibtorchUtils.h File Reference

Go to the source code of this file.

Namespaces

 LibtorchUtils
 

Functions

template<typename DataType >
void LibtorchUtils::vectorToTensor (std::vector< DataType > &vector, torch::Tensor &tensor, const bool detach=false)
 Utility function that converts a standard vector to a torch::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...