ninetoothed.Tensor.flatten#

Tensor.flatten(start_dim=None, end_dim=None)#

Flattens the specified dimensions of the tensor.

See ravel() for the differences between flatten() and ravel().

Parameters:
  • start_dim – The first dimension to flatten.

  • end_dim – The dimension after the last to flatten.

Returns:

The flattened tensor.