shape

fun shape(vararg dims: Int, init: SymbolicInit.() -> Unit = {}): TensorSpec(source)

Declare a tensor with an explicit shape.

Example: shape(2, 2) { ones() }


fun shape(dims: List<Int>, init: SymbolicInit.() -> Unit = {}): TensorSpec(source)

Shape overload that accepts a list.