structureND

open override fun structureND(shape: ShapeND, initializer: IntRing.(IntArray) -> Int): IntTensor(source)

Constructs a tensor with the specified shape and initializer.

Return

tensor with the shape shape and data generated by the initializer.

Parameters

shape

the desired shape for the tensor.

initializer

mapping tensor indices to values.