ONNXModelPreprocessor

class ONNXModelPreprocessor(onnxModel: OnnxInferenceModel?, outputIndex: Int) : Operation<Pair<FloatArray, TensorShape>, Pair<FloatArray, TensorShape>>

Applies the given onnxModel as a preprocessing stage.

Constructors

ONNXModelPreprocessor
Link copied to clipboard
fun ONNXModelPreprocessor(onnxModel: OnnxInferenceModel?, outputIndex: Int = 0)

Functions

apply
Link copied to clipboard
open override fun apply(input: Pair<FloatArray, TensorShape>): Pair<FloatArray, TensorShape>
getOutputShape
Link copied to clipboard
open override fun getOutputShape(inputShape: TensorShape): TensorShape

Properties

onnxModel
Link copied to clipboard
var onnxModel: OnnxInferenceModel?

ONNX model. It could have multiple outputs.

outputIndex
Link copied to clipboard
var outputIndex: Int = 0

Index of the output to be passed forward.