Fix typo in the TensorShape (#17813)

The function name in the log should be SizeToDimension
This commit is contained in:
Deoksang Kim 2023-12-02 09:48:55 +09:00 committed by GitHub
parent 92ee664f64
commit 2f8b86b939
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@ int64_t TensorShape::Size() const {
int64_t TensorShape::SizeToDimension(size_t dimension) const {
const size_t num_dims = values_.size();
ORT_ENFORCE(dimension <= num_dims,
"Invalid dimension of ", dimension, " for SizeFromDimension. Tensor has ",
"Invalid dimension of ", dimension, " for SizeToDimension. Tensor has ",
num_dims, " dimensions.");
int64_t size = SizeHelper(0, dimension);