torch.ReductionOptions
export interface ReductionOptions<OutShape extends Shape = Shape> {
/** Dimension(s) along which to reduce the tensor. */
dim?: number | number[];
/** If true, keeps the reduced dimension with size 1 for broadcasting. */
keepdim?: boolean;
/** Data type of the output. If not specified, inferred from input. */
dtype?: DType;
/** Pre-allocated output tensor. Must have compatible shape. */
out?: Tensor<OutShape>;
}OutShapeextends Shapedim(number | number[])optional- – Dimension(s) along which to reduce the tensor.
keepdim(boolean)optional- – If true, keeps the reduced dimension with size 1 for broadcasting.
dtype(DType)optional- – Data type of the output. If not specified, inferred from input.
out(Tensor<OutShape>)optional- – Pre-allocated output tensor. Must have compatible shape.
Options for sum, mean, prod operations