getPrediction method

Future<List?> getPrediction(
  1. List<double> input,
  2. List<int> shape,
  3. DType dtype
)

predicts abstract number input

Implementation

Future<List?> getPrediction(
    List<double> input, List<int> shape, DType dtype) async {
  final List? prediction = await _channel.invokeListMethod('predict', {
    "index": _index,
    "data": input,
    "shape": shape,
    "dtype": dtype.toString().split(".").last
  });
  return prediction;
}