Header file of the torch2Eigen namespace. More...
#include <iostream>#include <torch/script.h>#include <torch/torch.h>#include <Eigen/Eigen>#include "ITHACAassert.H"Go to the source code of this file.
Functions | |
| template<class type> | |
| torch::Tensor | ITHACAtorch::torch2Eigen::eigenMatrix2torchTensor (Eigen::Matrix< type, Eigen::Dynamic, Eigen::Dynamic > eigenMatrix) |
| Convert an eigen Matrix to a torch tensor. | |
| template<class type> | |
| Eigen::Matrix< type, Eigen::Dynamic, Eigen::Dynamic > | ITHACAtorch::torch2Eigen::torchTensor2eigenMatrix (torch::Tensor &torchTensor) |
| Convert a torch tensor to an eigen Matrix. | |
Header file of the torch2Eigen namespace.
It contains functions to
Definition in file torch2Eigen.H.
| torch::Tensor ITHACAtorch::torch2Eigen::eigenMatrix2torchTensor | ( | Eigen::Matrix< type, Eigen::Dynamic, Eigen::Dynamic > | eigenMatrix | ) |
Convert an eigen Matrix to a torch tensor.
| [in] | eigenMatrix | The eigen matrix |
| type | Can be double, float, int |
Definition at line 39 of file torch2Eigen.C.
| Eigen::Matrix< type, Eigen::Dynamic, Eigen::Dynamic > ITHACAtorch::torch2Eigen::torchTensor2eigenMatrix | ( | torch::Tensor & | torchTensor | ) |
Convert a torch tensor to an eigen Matrix.
| torchTensor | The torch tensor |
| type | Can be double, float, int |
Definition at line 55 of file torch2Eigen.C.
1.16.1