Tannic
A C++ Tensor Library
Loading...
Searching...
No Matches
tannic::expression::Argmin Struct Reference

Finds the indexes of minimum values along an axis. More...

#include <reductions.hpp>

Public Member Functions

constexpr type reduce (type dtype) const
 
constexpr Shape reduce (Shape const &shape) const
 
void forward (Tensor const &, Tensor &) const
 

Public Attributes

int axis
 
bool keepdim
 

Detailed Description

Finds the indexes of minimum values along an axis.

Identical to Argmax but for minima. Output dtype is int64. Use keepdim=true to maintain shape for broadcasting.

Example:

Tensor X = {{3, 1, 4},
{1, 5, 9}};
Tensor Y = argmin(X, 1);
// Y = [1, 0] // Min indexes per row
A multidimensional, strided tensor data structure.
Definition: tensor.hpp:105

Member Function Documentation

◆ forward()

void tannic::expression::Argmin::forward ( Tensor const &  ,
Tensor  
) const

◆ reduce() [1/2]

constexpr Shape tannic::expression::Argmin::reduce ( Shape const &  shape) const
inlineconstexpr

◆ reduce() [2/2]

constexpr type tannic::expression::Argmin::reduce ( type  dtype) const
inlineconstexpr

Member Data Documentation

◆ axis

int tannic::expression::Argmin::axis

◆ keepdim

bool tannic::expression::Argmin::keepdim

The documentation for this struct was generated from the following file: