predict

open override fun predict(inputData: FloatArray): Int

Generates output prediction for the input sample.

Parameters

inputData

Unlabeled input data to define label.

fun predict(inputData: FloatArray, inputTensorName: String, outputTensorName: String): Int

Predicts the class of inputData.

Return

Predicted class index.

Parameters

inputData

The single example with unknown label.

inputTensorName

The name of input tensor.

outputTensorName

The name of output tensor.

fun predict(dataset: OnHeapDataset, inputTensorName: String, outputTensorName: String): List<Int>

Predicts labels for all observation in dataset.

NOTE: Slow method, executed on client side, not in TensorFlow.

Parameters

inputTensorName

The name of input tensor.

outputTensorName

The name of output tensor.

dataset

Dataset.