diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-03-04 18:08:47 +0000 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-03-09 09:41:27 +0000 |
commit | 25d9775b08c59be8d17700f75026a8457aab9838 (patch) | |
tree | 449f2b1a450bd688dc2b925bd6e2cb9f28f9dc5b /arm_compute/runtime/CL | |
parent | c28d42837b2aea09738a7df00653d623c3c53420 (diff) | |
download | ComputeLibrary-25d9775b08c59be8d17700f75026a8457aab9838.tar.gz |
COMPMID-3225: Extend LSTMParams with parameters for Enhanced Quantized LSTM
Change-Id: I9732c7e7a7a89537cb046b973fd3a14f10caa06c
Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2836
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL')
-rw-r--r-- | arm_compute/runtime/CL/functions/CLLSTMLayer.h | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/arm_compute/runtime/CL/functions/CLLSTMLayer.h b/arm_compute/runtime/CL/functions/CLLSTMLayer.h index 9509016075..a94f239472 100644 --- a/arm_compute/runtime/CL/functions/CLLSTMLayer.h +++ b/arm_compute/runtime/CL/functions/CLLSTMLayer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 ARM Limited. + * Copyright (c) 2018-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -76,22 +76,23 @@ public: * @param[out] cell_state_out 2D tensor with dimensions [num_units, batch_size]. Data type supported: Same as @p input. * @param[out] output Destination tensor. Output is a 2D tensor with dimensions [output_size, batch_size]. * Data types supported: Same as @p input. - * @param[in] lstm_params (Optional) Weights tensors used in peephole optimization: - * input_to_input_weights 2D weights tensor with dimensions [input_size, num_units]. Data type supported: Same as @p input. - * recurrent_to_input_weights 2D weights tensor with dimensions [output_size, num_units]. Data type supported: Same as @p input. - * cell_to_input_weights 1D weights tensor with dimensions [num_units]. Can be nullptr. Data type supported: Same as @p input. - * cell_to_forget_weights 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. - * cell_to_output_weights 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. - * input_gate_bias 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input - * projection_weights 2D weights tensor with dimensions [output_size, num_units]. Data type supported: Same as @p input. - * projection_bias 1D weights tensor with dimensions [output_size]. Data type supported: Same as @p input. - * input_layer_norm_coefficients 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. - * forget_layer_norm_coefficients 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. - * cell_layer_norm_coefficients 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. - * output_layer_norm_coefficients 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. + * @param[in] lstm_params Weights tensors used in peephole optimization: + * input_to_input_weights 2D weights tensor with dimensions [input_size, num_units]. Data type supported: Same as @p input. + * recurrent_to_input_weights 2D weights tensor with dimensions [output_size, num_units]. Data type supported: Same as @p input. + * cell_to_input_weights 1D weights tensor with dimensions [num_units]. Can be nullptr. Data type supported: Same as @p input. + * cell_to_forget_weights 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. + * cell_to_output_weights 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. + * input_gate_bias 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input + * projection_weights 2D weights tensor with dimensions [output_size, num_units]. Data type supported: Same as @p input. + * projection_bias 1D weights tensor with dimensions [output_size]. Data type supported: Same as @p input. + * input_layer_norm_weights 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. + * forget_layer_norm_weights 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. + * cell_layer_norm_weights 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. + * output_layer_norm_weights 1D weights tensor with dimensions [num_units]. Data type supported: Same as @p input. * @param[in] activation_info Contains activation information described in @ref ActivationLayerInfo. - * @param[in] cell_threshold The clipping threshold for the cell state, such that values are bound within [-cell_clip, cell_clip]. If set to 0.0f then clipping is disabled. - * @param[in] projection_threshold The clipping threshold for the output from the projection layer, such that values are bound within [-proj_clip, proj_clip]. + * @param[in] cell_threshold (Optional) The clipping threshold for the cell state, such that values are bound within [-cell_clip, cell_clip]. + * If set to 0.0f then clipping is disabled. + * @param[in] projection_threshold (Optional) The clipping threshold for the output from the projection layer, such that values are bound within [-proj_clip, proj_clip]. * If set to 0.0f then clipping is disabled. */ void configure(const ICLTensor *input, @@ -121,22 +122,23 @@ public: * @param[in] output_state_out 2D weights tensor info with dimensions [output_size, batch_size]. Data type supported: Same as @p input. * @param[in] cell_state_out 2D tensor info with dimensions [num_units, batch_size]. Data type supported: Same as @p input. * @param[in] output Destination tensor info. Output is a 2D tensor with dimensions [output_size, batch_size]. Data types supported: Same as @p input. - * @param[in] lstm_params (Optional) Weights tensors info used in peephole optimization: - * input_to_input_weights 2D weights tensor info with dimensions [input_size, num_units]. Data type supported: Same as @p input. - * recurrent_to_input_weights 2D weights tensor info with dimensions [output_size, num_units]. Data type supported: Same as @p input. - * cell_to_input_weights 1D weights tensor info with dimensions [num_units]. Can be nullptr. Data type supported: Same as @p input. - * cell_to_forget_weights 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. - * cell_to_output_weights 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. - * input_gate_bias 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input - * projection_weights 2D weights tensor info with dimensions [output_size, num_units]. Data type supported: Same as @p input. - * projection_bias 1D weights tensor info with dimensions [output_size]. Data type supported: Same as @p input. - * input_layer_norm_coefficients 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. - * forget_layer_norm_coefficients 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. - * cell_layer_norm_coefficients 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. - * output_layer_norm_coefficients 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. + * @param[in] lstm_params Weights tensors info used in peephole optimization: + * input_to_input_weights 2D weights tensor info with dimensions [input_size, num_units]. Data type supported: Same as @p input. + * recurrent_to_input_weights 2D weights tensor info with dimensions [output_size, num_units]. Data type supported: Same as @p input. + * cell_to_input_weights 1D weights tensor info with dimensions [num_units]. Can be nullptr. Data type supported: Same as @p input. + * cell_to_forget_weights 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. + * cell_to_output_weights 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. + * input_gate_bias 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input + * projection_weights 2D weights tensor info with dimensions [output_size, num_units]. Data type supported: Same as @p input. + * projection_bias 1D weights tensor info with dimensions [output_size]. Data type supported: Same as @p input. + * input_layer_norm_weights 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. + * forget_layer_norm_weights 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. + * cell_layer_norm_weights 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. + * output_layer_norm_weights 1D weights tensor info with dimensions [num_units]. Data type supported: Same as @p input. * @param[in] activation_info Contains activation information described in @ref ActivationLayerInfo. - * @param[in] cell_threshold The clipping threshold for the cell state, such that values are bound within [-cell_clip, cell_clip]. If set to 0.0f then clipping is disabled. - * @param[in] projection_threshold The clipping threshold for the output from the projection layer, such that values are bound within [-proj_clip, proj_clip]. + * @param[in] cell_threshold (Optional) The clipping threshold for the cell state, such that values are bound within [-cell_clip, cell_clip]. + * If set to 0.0f then clipping is disabled. + * @param[in] projection_threshold (Optional) The clipping threshold for the output from the projection layer, such that values are bound within [-proj_clip, proj_clip]. * If set to 0.0f then clipping is disabled. * * @return a status |