Internal change

PiperOrigin-RevId: 521327449
This commit is contained in:
MediaPipe Team 2023-04-02 17:41:50 -07:00 committed by Copybara-Service
parent 1fa9b2c985
commit 696bedcaa1

View File

@ -191,8 +191,9 @@ absl::StatusOr<ImageTensorSpecs> BuildInputImageTensorSpecs(
MediaPipeTasksStatus::kInvalidInputTensorDimensionsError); MediaPipeTasksStatus::kInvalidInputTensorDimensionsError);
} }
size_t byte_depth = size_t byte_depth = tensor_type == tflite::TensorType_FLOAT32
tensor_type == tflite::TensorType_FLOAT32 ? sizeof(float) : sizeof(uint8); ? sizeof(float)
: sizeof(uint8_t);
int bytes_size = byte_depth * batch * height * width * depth; int bytes_size = byte_depth * batch * height * width * depth;
// Sanity checks. // Sanity checks.
if (tensor_type == tflite::TensorType_FLOAT32) { if (tensor_type == tflite::TensorType_FLOAT32) {