TTypes<T>::Vec tensorflow::Tensor::vec()
Return the tensor data as an Eigen::Tensor with the type and sizes of this Tensor.
Use these methods when you know the data type and the number of dimensions of the Tensor and you want an Eigen::Tensor automatically sized to the Tensor sizes. The implementation check fails if either type or sizes mismatch.
Example:
Tensor my_mat(...built with Shape{rows: 3, cols: 5}...);
auto mat = my_mat.matrix<T>(); // 2D Eigen::Tensor, 3 x 5.
auto mat