pub trait Reduce<Axes>: Sized + Tensor<Dtype = f32> {
    type Reduced: BroadcastTo<Self, Axes> + Tensor<Tape = Self::Tape, Dtype = Self::Dtype>;
    type DeviceR: DeviceReduce<Self::Array, Axes, Reduced = <Self::Reduced as HasArrayType>::Array>;
}
Expand description

Remove Axes of tensor by reducing them. Opposite of BroadcastTo.

Enables functions like sum() that reduce values along a single dimension.

This trait can’t be used directly as it doesn’t contain any methods. Instead it is used by methods to specify the input type must be able to have it’s axes reduced.

Required Associated Types

The resulting tensor type. This can be broadcast into Self via BroadcastTo.

Implementors