1 #ifndef SOPT_CPPFLOWUTILS_H
2 #define SOPT_CPPFLOWUTILS_H
6 #include <cppflow/cppflow.h>
7 #include "cppflow/ops.h"
21 Eigen::Map<Eigen::Array<double, Eigen::Dynamic, Eigen::Dynamic>>
convert_tensor_to_image(std::vector<float> model_output,
int image_rows,
int image_cols);
cppflow::tensor convert_image_to_tensor(Image< double > const &image, int image_rows, int image_cols)
Converts a sopt::Image to a cppflow::tensor.
Eigen::Map< Eigen::Array< double, Eigen::Dynamic, Eigen::Dynamic > > convert_tensor_to_image(std::vector< float > model_output, int image_rows, int image_cols)
Convert a cppflow:tensor to an Eigen::Array.
Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic > Image
A 2-dimensional list of elements of given type.
Eigen::Matrix< T, Eigen::Dynamic, 1 > Vector
A vector of a given type.