ReshapeTensorExtension<T> extension

on

Methods

flatten() Tensor<T>

Available on Tensor<T>, provided by the ReshapeTensorExtension extension

Return the tensor collapsed into one dimension.
reshape(List<int> shape) Tensor<T>

Available on Tensor<T>, provided by the ReshapeTensorExtension extension

Returns a reshaped view, if possible. If a dimension is set to -1 it is inferred automatically to keep the length constant.