getOutputTensors method

List<Tensor> getOutputTensors()

Gets all output tensors associated with the model.

Implementation

List<Tensor> getOutputTensors() {
  if (_outputTensors != null) {
    return _outputTensors!;
  }

  var tensors = List.generate(
      tfLiteInterpreterGetOutputTensorCount(_interpreter),
      (i) => Tensor(tfLiteInterpreterGetOutputTensor(_interpreter, i)),
      growable: false);

  return tensors;
}