24.02.1
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_CLLSTMLAYER_H
25 #define ARM_COMPUTE_CLLSTMLAYER_H
47 class CLCompileContext;
64 CLLSTMLayer(std::shared_ptr<IMemoryManager> memory_manager =
nullptr);
140 float cell_threshold = 0.f,
141 float projection_threshold = 0.f);
200 float cell_threshold = 0.f,
201 float projection_threshold = 0.f);
261 float cell_threshold = 0.f,
262 float projection_threshold = 0.f);
281 std::unique_ptr<opencl::kernels::ClTransposeKernel> _transpose_cell_state;
346 bool _run_peephole_opt;
348 bool _perform_cell_clipping;
349 bool _has_projection_weights;
350 bool _perform_projection_clipping;
352 bool _is_layer_norm_lstm;
353 const ICLTensor *_recurrent_to_cell_weights{
nullptr};
void prepare() override
Prepare the function for executing.
Base class for all functions.
Interface for OpenCL tensor.
OpenCL kernel to transpose a tensor.
Basic implementation of the OpenCL tensor interface.
Basic function to run opencl::kernels::ClFillKernel.
void run() override
Run the kernels contained in the function.
Basic function to execute concatenate tensors along a given axis.
Activation Layer Information class.
auto recurrent_to_forget_weights
static Status validate(const ITensorInfo *input, const ITensorInfo *input_to_forget_weights, const ITensorInfo *input_to_cell_weights, const ITensorInfo *input_to_output_weights, const ITensorInfo *recurrent_to_forget_weights, const ITensorInfo *recurrent_to_cell_weights, const ITensorInfo *recurrent_to_output_weights, const ITensorInfo *forget_gate_bias, const ITensorInfo *cell_bias, const ITensorInfo *output_gate_bias, const ITensorInfo *output_state_in, const ITensorInfo *cell_state_in, const ITensorInfo *scratch_buffer, const ITensorInfo *output_state_out, const ITensorInfo *cell_state_out, const ITensorInfo *output, const LSTMParams< ITensorInfo > &lstm_params, const ActivationLayerInfo &activation_info, float cell_threshold=0.f, float projection_threshold=0.f)
Static function to check if given info will lead to a valid configuration of CLLSTMLayer.
~CLLSTMLayer()
Default destructor.
Basic function to execute GEMM on OpenCL.
Basic function to run opencl::ClMul.
auto recurrent_to_output_weights
CLLSTMLayer & operator=(const CLLSTMLayer &)=delete
Prevent instances of this class from being copied.
void configure(const ICLTensor *input, const ICLTensor *input_to_forget_weights, const ICLTensor *input_to_cell_weights, const ICLTensor *input_to_output_weights, const ICLTensor *recurrent_to_forget_weights, const ICLTensor *recurrent_to_cell_weights, const ICLTensor *recurrent_to_output_weights, const ICLTensor *forget_gate_bias, const ICLTensor *cell_bias, const ICLTensor *output_gate_bias, const ICLTensor *output_state_in, ICLTensor *cell_state_in, ICLTensor *scratch_buffer, ICLTensor *output_state_out, ICLTensor *cell_state_out, ICLTensor *output, const LSTMParams< ICLTensor > &lstm_params, const ActivationLayerInfo &activation_info, float cell_threshold=0.f, float projection_threshold=0.f)
Initialize function's tensors.
CLLSTMLayer(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Default constructor.
Basic function to compute a Fully Connected layer on OpenCL.
Basic function to run opencl::kernels::ClCopyKernel.
Basic function to run opencl::kernels::ClSaturatedArithmeticKernel for subtraction.
Copyright (c) 2017-2024 Arm Limited.
Basic function to run opencl::kernels::ClSaturatedArithmeticKernel for addition.
Basic function to execute mean and standard deviation normalization by calling CLMeanStdDevNormalizat...
Store the tensor's metadata.
Basic function to run opencl::kernels::ClActivationKernel.
auto input_to_forget_weights
auto input_to_output_weights
auto input_to_cell_weights
auto recurrent_to_cell_weights
This function performs a single time step in a Long Short-Term Memory (LSTM) layer.