#pragma once #include "common.h" #include #include namespace ppredictor { class PredictorOutput { public: PredictorOutput() {} PredictorOutput(std::unique_ptr &&tensor, int index, int net_flag) : _tensor(std::move(tensor)), _index(index), _net_flag(net_flag) {} const float *get_float_data() const; const int *get_int_data() const; int64_t get_size() const; const std::vector> get_lod() const; const std::vector get_shape() const; std::vector data; // return float, or use data_int std::vector data_int; // several layers return int ,or use data std::vector shape; // PaddleLite output shape std::vector> lod; // PaddleLite output lod private: std::unique_ptr _tensor; int _index; int _net_flag; }; }