{"record":{"id":"a1eb27b9d994c547","repo":"tensorflow/models","slug":"is-missing-in-outputs-requried-found","errorCode":null,"errorMessage":"\"{}\" is missing in outputs, requried {} found {}","messagePattern":"\"(.+?)\" is missing in outputs, requried (.+?) found (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/legacy/detection/modeling/shapemask_model.py","lineNumber":276,"sourceCode":"      outputs = self.model_outputs(input_layers, mode)\n\n      model = tf_keras.models.Model(\n          inputs=input_layers, outputs=outputs, name='shapemask')\n      assert model is not None, 'Fail to build tf_keras.Model.'\n      model.optimizer = self.build_optimizer()\n      self._keras_model = model\n\n    return self._keras_model\n\n  def post_processing(self, labels, outputs):\n    required_output_fields = [\n        'num_detections', 'detection_boxes', 'detection_classes',\n        'detection_masks', 'detection_scores'\n    ]\n\n    for field in required_output_fields:\n      if field not in outputs:\n        raise ValueError(\n            '\"{}\" is missing in outputs, requried {} found {}'.format(\n                field, required_output_fields, outputs.keys()))\n\n    required_label_fields = ['image_info']\n    for field in required_label_fields:\n      if field not in labels:\n        raise ValueError(\n            '\"{}\" is missing in labels, requried {} found {}'.format(\n                field, required_label_fields, labels.keys()))\n\n    predictions = {\n        'image_info': labels['image_info'],\n        'num_detections': outputs['num_detections'],\n        'detection_boxes': outputs['detection_boxes'],\n        'detection_outer_boxes': outputs['detection_outer_boxes'],\n        'detection_classes': outputs['detection_classes'],\n        'detection_scores': outputs['detection_scores'],\n        'detection_masks': outputs['detection_masks'],","sourceCodeStart":258,"sourceCodeEnd":294,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legacy/detection/modeling/shapemask_model.py#L258-L294","documentation":"Error \"\"{}\" is missing in outputs, requried {} found {}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/legacy/detection/modeling/shapemask_model.py:276 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}