loadTensorData

Load tensor data by name.

Only available in streaming mode (JVM). Returns null in legacy mode or if tensor not found.

Return

Raw tensor bytes, or null if not available

Parameters

tensorName

The name of the tensor to load


fun loadTensorData(tensorName: String, buffer: ByteArray, offset: Int = 0): Int(source)

Load tensor data into an existing buffer.

Useful for avoiding allocations when processing multiple tensors. Only available in streaming mode.

Return

Number of bytes read, or -1 if not available

Parameters

tensorName

The name of the tensor to load

buffer

Target buffer (must be large enough for tensor data)

offset

Starting offset in buffer