loadTensorData

Load tensor data by name.

Return

Raw bytes for the tensor

Parameters

name

The tensor name

Throws

if tensor not found


Load tensor data for a specific tensor.

Return

Raw bytes for the tensor

Parameters

tensor

The tensor info from tensors list


fun loadTensorData(tensor: StreamingOnnxTensorInfo, buffer: ByteArray, offset: Int = 0): Int(source)

Load tensor data into an existing buffer.

Return

Number of bytes read

Parameters

tensor

The tensor info

buffer

Target buffer (must be at least tensor.rawDataLength)

offset

Starting offset in buffer