Skip to content

dnn_Reduce2Layer_ReduceType

Deep neural networksclassOpenCV 5.0.0
import { dnn_Reduce2Layer_ReduceType } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSConstructor or factory
CLASSdnn_Reduce2Layer_ReduceType
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods.

GatherElements layer GatherElements takes two inputs data and indices of the same rank r >= 1 and an optional attribute axis and works such that: output[i][j][k] = data[index[i][j][k]][j][k] if axis = 0 and r = 3 output[i][j][k] = data[i][index[i][j][k]][k] if axis = 1 and r = 3 output[i][j][k] = data[i][j][index[i][j][k]] if axis = 2 and r = 3

Gather, on the other hand, takes a data tensor of rank r >= 1, and indices tensor of rank q, and works such that: it gathers the enteries along axis dimension of the input data indexed by indices and concatenates them in an output tensor of rank q + (r - 1) e.g. If axis = 0, let k = indices[i_{0}, ..., i_{q-1}] then output[i_{0}, ..., i_{q-1}, j_{0}, ..., j_{r-2}] = input[k , j_{0}, ..., j_{r-2}]:

Constructors and members

static MAX

max constant (0), defined by OpenCV for cv::dnn::Reduce2Layer::ReduceType.

MAX: dnn_Reduce2Layer_ReduceTypeValue<0>,

static MIN

min constant (1), defined by OpenCV for cv::dnn::Reduce2Layer::ReduceType.

MIN: dnn_Reduce2Layer_ReduceTypeValue<1>,

static MEAN

mean constant (2), defined by OpenCV for cv::dnn::Reduce2Layer::ReduceType.

MEAN: dnn_Reduce2Layer_ReduceTypeValue<2>,

static SUM

sum constant (3), defined by OpenCV for cv::dnn::Reduce2Layer::ReduceType.

SUM: dnn_Reduce2Layer_ReduceTypeValue<3>,

static L1

l1 constant (4), defined by OpenCV for cv::dnn::Reduce2Layer::ReduceType.

L1: dnn_Reduce2Layer_ReduceTypeValue<4>,

static L2

l2 constant (5), defined by OpenCV for cv::dnn::Reduce2Layer::ReduceType.

L2: dnn_Reduce2Layer_ReduceTypeValue<5>,

static PROD

prod constant (6), defined by OpenCV for cv::dnn::Reduce2Layer::ReduceType.

PROD: dnn_Reduce2Layer_ReduceTypeValue<6>,

static SUM_SQUARE

sum square constant (7), defined by OpenCV for cv::dnn::Reduce2Layer::ReduceType.

SUM_SQUARE: dnn_Reduce2Layer_ReduceTypeValue<7>,

static LOG_SUM

log sum constant (8), defined by OpenCV for cv::dnn::Reduce2Layer::ReduceType.

LOG_SUM: dnn_Reduce2Layer_ReduceTypeValue<8>,

static LOG_SUM_EXP

log sum exp constant (9), defined by OpenCV for cv::dnn::Reduce2Layer::ReduceType.

LOG_SUM_EXP: dnn_Reduce2Layer_ReduceTypeValue<9>

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.