ag_sum: Sum all elements (or along a dim): out = sum(x)

View source: R/autograd.R

ag_sumR Documentation

Sum all elements (or along a dim): out = sum(x)

Description

Sum all elements (or along a dim): out = sum(x)

Usage

ag_sum(x, dim = NULL, keepdim = FALSE)

Arguments

x

ag_tensor

dim

NULL (all), 1 (row-wise), or 2 (col-wise)

keepdim

Logical: keep size-1 dimensions

Value

scalar (or reduced) ag_tensor


ggmlR documentation built on July 14, 2026, 1:08 a.m.