From 696bedcaa10ed24f4be77bf57c828197206d3aef Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Sun, 2 Apr 2023 17:41:50 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 521327449 --- mediapipe/tasks/cc/vision/utils/image_tensor_specs.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mediapipe/tasks/cc/vision/utils/image_tensor_specs.cc b/mediapipe/tasks/cc/vision/utils/image_tensor_specs.cc index 4d3d2cb96..3f0425a69 100644 --- a/mediapipe/tasks/cc/vision/utils/image_tensor_specs.cc +++ b/mediapipe/tasks/cc/vision/utils/image_tensor_specs.cc @@ -191,8 +191,9 @@ absl::StatusOr BuildInputImageTensorSpecs( MediaPipeTasksStatus::kInvalidInputTensorDimensionsError); } - size_t byte_depth = - tensor_type == tflite::TensorType_FLOAT32 ? sizeof(float) : sizeof(uint8); + size_t byte_depth = tensor_type == tflite::TensorType_FLOAT32 + ? sizeof(float) + : sizeof(uint8_t); int bytes_size = byte_depth * batch * height * width * depth; // Sanity checks. if (tensor_type == tflite::TensorType_FLOAT32) {