Types
ChunkSplitGate[TT] {.final.} = ref object of Gate[TT]
- Source Edit
Procs
proc chunk[TT](v: Variable[TT]; nb_chunks: Positive; axis: Natural): seq[ Variable[TT]]
-
Splits a Variable into n chunks along the specified axis.
In case a tensor cannot be split evenly, with la == length_axis, n = n_chunks it returns la mod n subtensors of size (la div n) + 1 the rest of size la div n. So split sizes at most differs by 1
This is consistent with numpy array_split
Source Edit