writeFloatBuffer

expect fun writeFloatBuffer(buffer: TFBuffer, mean: Float = 0.0f, std: Float = 1.0f)

Directly writes the image pixel data to a float TFBuffer with normalization.

This is an optimized operation that avoids creating intermediate Kotlin arrays when possible.

Parameters

buffer

The target TFBuffer to write to.

mean

The value subtracted from each channel. Defaults to 0f.

std

The value used to divide each channel after subtraction. Defaults to 1f.