Fix an incorrect model sanity check in the object detector graph.
PiperOrigin-RevId: 493663592
This commit is contained in:
parent
80c605459c
commit
3c0ddf16b4
|
@ -532,8 +532,7 @@ class ObjectDetectorGraph : public core::ModelTaskGraph {
|
||||||
MP_RETURN_IF_ERROR(SanityCheckOptions(task_options));
|
MP_RETURN_IF_ERROR(SanityCheckOptions(task_options));
|
||||||
// Checks that the model has 4 outputs.
|
// Checks that the model has 4 outputs.
|
||||||
auto& model = *model_resources.GetTfLiteModel();
|
auto& model = *model_resources.GetTfLiteModel();
|
||||||
if (model.subgraphs()->size() != 1 ||
|
if (model.subgraphs()->size() != 1) {
|
||||||
(*model.subgraphs())[0]->outputs()->size() != 4) {
|
|
||||||
return CreateStatusWithPayload(
|
return CreateStatusWithPayload(
|
||||||
absl::StatusCode::kInvalidArgument,
|
absl::StatusCode::kInvalidArgument,
|
||||||
absl::StrFormat("Expected a model with a single subgraph, found %d.",
|
absl::StrFormat("Expected a model with a single subgraph, found %d.",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user