ONE - On-device Neural Engine
Loading...
Searching...
No Matches
arm_compute::NEOneHot Class Reference

#include <NEOneHot.h>

Collaboration diagram for arm_compute::NEOneHot:

Public Member Functions

void configure (const ITensor *indices, const ITensor *depth, const ITensor *on_value, const ITensor *off_value, ITensor *output, int axis=-1)
 

Static Public Member Functions

static Status validate (const ITensorInfo *indices, const ITensorInfo *depth, const ITensorInfo *on_value, const ITensorInfo *off_value, const ITensorInfo *output, int axis=-1)
 

Detailed Description

Basic function to run NEOneHotKernel

Definition at line 51 of file NEOneHot.h.

Member Function Documentation

◆ configure()

void arm_compute::NEOneHot::configure ( const ITensor *  indices,
const ITensor *  depth,
const ITensor *  on_value,
const ITensor *  off_value,
ITensor *  output,
int  axis = -1 
)

Initialise the kernel's inputs and outputs

Parameters
[in]indicesIndices tensor. Supported tensor rank: up to 3. Must be one of the following types: U32/S32
[in]depthThe tensor for depth of the one hot dimension. Supported tensor rank: up to 3. Must be one of the following types: U32/S32
[in]on_valueOn value tensor. Supported tensor rank: only 1. Data type supported: U8/S8/U16/S16/F16/U32/S32/F32
[in]off_valueOff value tensor. Supported tensor rank: only 1. Data type supported: Same as on_value
[out]outputDestination tensor. Data type supported: Same as on_value
[in]axis(Optional) The axis to fill. Negative values wrap around. Defaults to -1. The value must be in range [-indices.rank , indices.rank)

Definition at line 46 of file NEOneHot.cpp.

48{
49 auto k = std::make_unique<NEOneHotKernel>();
50 k->configure(indices, depth, on_value, off_value, output, axis);
51 _kernel = std::move(k);
52}

◆ validate()

Status arm_compute::NEOneHot::validate ( const ITensorInfo *  indices,
const ITensorInfo *  depth,
const ITensorInfo *  on_value,
const ITensorInfo *  off_value,
const ITensorInfo *  output,
int  axis = -1 
)
static

Static function to check if given info will lead to a valid configuration of NEOneHotKernel

Parameters
[in]indicesIndices tensor info. Supported tensor rank: up to 3. Must be one of the following types: U32/S32
[in]depthThe tensor info for depth of the one hot dimension. Supported tensor rank: up to 3. Must be one of the following types: U32/S32
[in]on_valueOn value tensor info. Supported tensor rank: only 1. Data type supported: U8/S8/U16/S16/F16/U32/S32/F32
[in]off_valueOff value tensor info. Supported tensor rank: only 1. Data type supported: Same as on_value
[out]outputDestination tensor info. Data type supported: Same as on_value
[in]axis(Optional) The axis to fill. Negative values wrap around. Defaults to -1. The value must be in range [-indices.rank , indices.rank)
Returns
a status

Definition at line 53 of file NEOneHot.cpp.

56{
57 return NEOneHotKernel::validate(indices, depth, on_value, off_value, output, axis);
58}
static Status validate(const ITensorInfo *indices, const ITensorInfo *depth, const ITensorInfo *on_value, const ITensorInfo *off_value, const ITensorInfo *output, int axis=-1)

References arm_compute::NEOneHotKernel::validate().


The documentation for this class was generated from the following files: