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(
      tfLiteInterpreterGetInputTensorCount(_interpreter),
      (i) => Tensor(tfLiteInterpreterGetInputTensor(_interpreter, i)),
      growable: false);

  return tensors;
}