split

fun DTensor.split(shapes: List<Shape>): List<DTensor>

Takes a tensor, and a list of the desired shapes of the components to split it into, and breaks the values up into a list of DValues. For a desired shape that is an empty List, a DScalar is produced. Otherwise a DTensor is produced with the desired shape.

The total number of scalar values required for the outputs collectively must be exactly the same as the number of values in the input tensor, this. Otherwise an IllegalArgumentException is thrown.