fromArray

fun fromArray(values: FloatArray, shape: List<Int>? = null): TensorSpec(source)

Infer shape from a flat float array. Stores initializer metadata only; no allocation is performed.


fun fromArray(values: IntArray, shape: List<Int>? = null): TensorSpec(source)

Infer shape from a flat int array. Stores initializer metadata only; no allocation is performed.