获取张量对象shape。
const std::vector<int64_t> &GetShape() const
无。
std::string name = "INPUT_IDS"; mindie_llm::InferDataType dataType = mindie_llm::InferDataType::TYPE_INT64; std::vector<int64_t> dataShape = {1, 2}; auto inputsTensor = std::make_shared<mindie_llm::InferTensor>(name, dataType, dataShape); std::vector<int64_t> shape = inputsTensor->GetShape();
tensor的数据维度,类型为vector<int64_t>。