Fix an incorrect model sanity check in the object detector graph.

PiperOrigin-RevId: 493663592
This commit is contained in:
Jiuqiang Tang 2022-12-07 11:37:04 -08:00 committed by Copybara-Service
parent 80c605459c
commit 3c0ddf16b4

View File

@ -532,8 +532,7 @@ class ObjectDetectorGraph : public core::ModelTaskGraph {
MP_RETURN_IF_ERROR(SanityCheckOptions(task_options));
// Checks that the model has 4 outputs.
auto& model = *model_resources.GetTfLiteModel();
if (model.subgraphs()->size() != 1 ||
(*model.subgraphs())[0]->outputs()->size() != 4) {
if (model.subgraphs()->size() != 1) {
return CreateStatusWithPayload(
absl::StatusCode::kInvalidArgument,
absl::StrFormat("Expected a model with a single subgraph, found %d.",