ONE - On-device Neural Engine
|
#include <CLOneHotKernel.h>
Public Member Functions | |
CLOneHotKernel () | |
CLOneHotKernel (const CLOneHotKernel &)=delete | |
CLOneHotKernel & | operator= (const CLOneHotKernel &)=delete |
CLOneHotKernel (CLOneHotKernel &&)=default | |
CLOneHotKernel & | operator= (CLOneHotKernel &&)=default |
~CLOneHotKernel ()=default | |
void | configure (const ICLTensor *indices, const ICLTensor *on_value, const ICLTensor *off_value, ICLTensor *output, int depth, int axis=-1) |
void | configure (const ICLTensor *indices, const ICLTensor *on_value, ICLTensor *output, int depth, int axis=-1) |
void | run (const Window &window, cl::CommandQueue &queue) override |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *indices, const ITensorInfo *on_value, const ITensorInfo *off_value, const ITensorInfo *output, int depth, int axis=-1) |
static Status | validate (const ITensorInfo *indices, const ITensorInfo *on_value, const ITensorInfo *output, int depth, int axis=-1) |
Interface for the kernel to perform one-hot encoding
Definition at line 48 of file CLOneHotKernel.h.
arm_compute::CLOneHotKernel::CLOneHotKernel | ( | ) |
Default constructor
Definition at line 94 of file CLOneHotKernel.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved
|
default |
Default destructor
References validate().
void arm_compute::CLOneHotKernel::configure | ( | const ICLTensor * | indices, |
const ICLTensor * | on_value, | ||
const ICLTensor * | off_value, | ||
ICLTensor * | output, | ||
int | depth, | ||
int | axis = -1 |
||
) |
Initialise the kernel's inputs and output
[in] | indices | Indices tensor. Supported tensor rank: up to 3. Must be one of the following types: U32/S32 |
[in] | on_value | On value tensor. Supported tensor rank: only 1. Data type supported: U8/S8/U16/S16/F16/U32/S32/F32 |
[in] | off_value | Off value tensor. Supported tensor rank: only 1. Data type supported: Same as on_value |
[out] | output | Destination tensor. Data type supported: Same as on_value |
[in] | depth | The depth of the one hot dimension. |
[in] | axis | (Optional) The axis to fill. Negative values wrap around. Defaults to -1. value must be in range [-indices.rank , indices.rank) |
Definition at line 99 of file CLOneHotKernel.cpp.
Referenced by arm_compute::CLOneHot::configure(), and arm_compute::CLOneHot::configure().
void arm_compute::CLOneHotKernel::configure | ( | const ICLTensor * | indices, |
const ICLTensor * | on_value, | ||
ICLTensor * | output, | ||
int | depth, | ||
int | axis = -1 |
||
) |
Initialise the kernel's inputs and output already initialized to off_value
[in] | indices | Indices tensor. Supported tensor rank: up to 3. Must be one of the following types: U32/S32 |
[in] | on_value | On value tensor. Supported tensor rank: only 1. Data type supported: U8/S8/U16/S16/F16/U32/S32/F32 |
[out] | output | Destination tensor. Data type supported: Same as on_value |
[in] | depth | The depth of the one hot dimension. |
[in] | axis | (Optional) The axis to fill. Negative values wrap around. Defaults to -1. value must be in range [-indices.rank , indices.rank) |
Definition at line 110 of file CLOneHotKernel.cpp.
|
default |
Allow instances of this class to be moved
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
override |
Definition at line 173 of file CLOneHotKernel.cpp.
Referenced by package.infer.session::inference().
|
static |
Static function to check if given info will lead to a valid configuration of CLOneHotKernel
[in] | indices | Indices tensor. Supported tensor rank: up to 3. Must be one of the following types: U32/S32 |
[in] | on_value | On value tensor. Supported tensor rank: only 1. Data type supported: U8/S8/U16/S16/F16/U32/S32/F32 |
[in] | off_value | Off value tensor. Supported tensor rank: only 1. Data type supported: Same as on_value |
[in] | output | Destination tensor. Data type supported: Same as on_value |
[in] | depth | The depth of the one hot dimension. |
[in] | axis | (Optional) The axis to fill. Negative values wrap around. Defaults to -1. value must be in range [-indices.rank , indices.rank) |
Definition at line 149 of file CLOneHotKernel.cpp.
Referenced by arm_compute::CLOneHot::validate(), and ~CLOneHotKernel().
|
static |
Static function to check if given info will lead to a valid configuration of CLOneHotKernel without off_value
[in] | indices | Indices tensor. Supported tensor rank: up to 3. Must be one of the following types: U32/S32 |
[in] | on_value | On value tensor. Supported tensor rank: only 1. Data type supported: U8/S8/U16/S16/F16/U32/S32/F32 |
[in] | output | Destination tensor. Data type supported: Same as on_value |
[in] | depth | The depth of the one hot dimension. |
[in] | axis | (Optional) The axis to fill. Negative values wrap around. Defaults to -1. value must be in range [-indices.rank , indices.rank) |
Definition at line 163 of file CLOneHotKernel.cpp.