82 using RowMajorMatrixXf = Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
166 int64_t
size()
const;
172 const std::vector<int64_t>&
shape()
const;
179 int64_t
shape(
int dim)
const;
207 const float*
data()
const;
270 static int64_t computeSize(
const std::vector<int64_t>&
shape);
272 std::shared_ptr<std::vector<float>> m_storage;
273 float* m_data =
nullptr;
274 std::vector<int64_t> m_shape;
ml library export/import macros.
Machine learning (models, pipelines, ONNX Runtime integration).
Eigen::MatrixXf toMatrixXf() const
Eigen::Map< RowMajorMatrixXf > RowMajorMatrixMap
Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > RowMajorMatrixXf
static MlTensor fromBuffer(const float *data, int rows, int cols)
Eigen::MatrixXd toMatrixXd() const
static MlTensor view(float *data, std::vector< int64_t > shape)
MlTensor(const Eigen::MatrixXd &mat)
RowMajorMatrixMap matrix()
MlTensor(const Eigen::MatrixXf &mat)
MlTensor reshape(std::vector< int64_t > newShape) const
const std::vector< int64_t > & shape() const
Eigen::Map< const RowMajorMatrixXf > ConstRowMajorMatrixMap