ag_max: Column-wise maximum

View source: R/ag_select.R

ag_maxR Documentation

Column-wise maximum

Description

ag_gather(x, ag_argmax(x)): the largest entry of every column, as a [1, batch] ag_tensor. Differentiable; the gradient goes to the selected entry only. With ties that is the FIRST maximum (the ag_argmax rule), and it is not split between the tied entries – a convention, which some frameworks resolve differently.

Usage

ag_max(x)

Arguments

x

ag_tensor or numeric matrix, [n, batch].

Details

Calls ag_argmax, so on the GPU it is a synchronisation point.

Value

ag_tensor [1, batch].


ggmlR documentation built on Oct. 23, 2026, 1:07 a.m.