diff options
Diffstat (limited to 'reference_model/src/tensor.h')
-rw-r--r-- | reference_model/src/tensor.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/reference_model/src/tensor.h b/reference_model/src/tensor.h index b68a9b6..21cf148 100644 --- a/reference_model/src/tensor.h +++ b/reference_model/src/tensor.h @@ -96,6 +96,12 @@ public: return shape; } + void setDimSize(size_t dim, uint32_t new_size) + { + this->shape[dim] = new_size; + return; + } + std::string getShapeAsString() const { std::string shape_str("["); @@ -269,7 +275,7 @@ public: protected: const std::string tensorName; const DType serializationDtype; - const std::vector<int> shape; + std::vector<int> shape; const TOSA_REF_TYPE tensorDtype; int isValid; int isSubgraphInput; |