getInputTensors method

List<Tensor> getInputTensors()

Gets all input tensors associated with the model.

Implementation

List<Tensor> getInputTensors() {
  if (_inputTensors != null) {
    return _inputTensors!;
  }

  var tensors = List.generate(
      tfliteBinding.TfLiteInterpreterGetInputTensorCount(_interpreter),
      (i) => Tensor(
          tfliteBinding.TfLiteInterpreterGetInputTensor(_interpreter, i)),
      growable: false);

  return tensors;
}