braincore.math.flatten#
- braincore.math.flatten(input, start_dim=None, end_dim=None)#
Flattens input by reshaping it into a one-dimensional tensor. If
start_dimorend_dimare passed, only dimensions starting withstart_dimand ending withend_dimare flattened. The order of elements in input is unchanged.Note
Flattening a zero-dimensional tensor will return a one-dimensional view.