How to reshape a tensor in Eigen3?
问题 I get some Eigen::TensorMap from the outputs vector from a tensorflow session in C++. I want to do some operations to the Eigen::TensorMap (reshape and concat etc.). However, my codes cannot be compiled due to some weird error. I tried to reproduce it in pure Eigen3 code. #include <unsupported/Eigen/CXX11/Tensor> using Eigen::Tensor; using Eigen::TensorMap; using Eigen::TensorRef; using std::vector; int main() { int storage[128]; TensorMap<Tensor<int, 4>> t_4d(storage, 2, 4, 2, 8); vector