tensorflow_model_analysis/extractors/tfjs_predict_extractor.py [204:225]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      for v in outputs.values():
        if len(v) != len(feature_rows):
          raise ValueError('Did not get the expected number of results.')

      for i in range(len(feature_rows)):
        output = {k: v[i] for k, v in outputs.items()}

        if len(output) == 1:
          output = list(output.values())[0]

        if len(self._eval_config.model_specs) == 1:
          result[constants.PREDICTIONS_KEY].append(output)
        else:
          if i >= len(result[constants.PREDICTIONS_KEY]):
            result[constants.PREDICTIONS_KEY].append({})
          result[constants.PREDICTIONS_KEY][i].update({spec.name: output})
    return [result]


@beam.ptransform_fn
@beam.typehints.with_input_types(types.Extracts)
@beam.typehints.with_output_types(types.Extracts)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tensorflow_model_analysis/extractors/tflite_predict_extractor.py [134:155]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      for v in outputs.values():
        if len(v) != len(feature_rows):
          raise ValueError('Did not get the expected number of results.')

      for i in range(len(feature_rows)):
        output = {k: v[i] for k, v in outputs.items()}

        if len(output) == 1:
          output = list(output.values())[0]

        if len(self._eval_config.model_specs) == 1:
          result[constants.PREDICTIONS_KEY].append(output)
        else:
          if i >= len(result[constants.PREDICTIONS_KEY]):
            result[constants.PREDICTIONS_KEY].append({})
          result[constants.PREDICTIONS_KEY][i].update({spec.name: output})
    return [result]


@beam.ptransform_fn
@beam.typehints.with_input_types(types.Extracts)
@beam.typehints.with_output_types(types.Extracts)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



