/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_CONTRIB_LITE_KERNELS_LSTM_EVAL_H_ #define TENSORFLOW_CONTRIB_LITE_KERNELS_LSTM_EVAL_H_ #include "tensorflow/contrib/lite/c/builtin_op_data.h" #include "tensorflow/contrib/lite/c/c_api_internal.h" namespace tflite { namespace ops { namespace builtin { namespace lstm_eval { TfLiteStatus EvalFloat( const TfLiteTensor* input, const TfLiteTensor* input_to_input_weights, const TfLiteTensor* input_to_forget_weights, const TfLiteTensor* input_to_cell_weights, const TfLiteTensor* input_to_output_weights, const TfLiteTensor* recurrent_to_input_weights, const TfLiteTensor* recurrent_to_forget_weights, const TfLiteTensor* recurrent_to_cell_weights, const TfLiteTensor* recurrent_to_output_weights, const TfLiteTensor* cell_to_input_weights, const TfLiteTensor* cell_to_forget_weights, const TfLiteTensor* cell_to_output_weights, const TfLiteTensor* aux_input, const TfLiteTensor* aux_input_to_input_weights, const TfLiteTensor* aux_input_to_forget_weights, const TfLiteTensor* aux_input_to_cell_weights, const TfLiteTensor* aux_input_to_output_weights, const TfLiteTensor* input_gate_bias, const TfLiteTensor* forget_gate_bias, const TfLiteTensor* cell_bias, const TfLiteTensor* output_gate_bias, const TfLiteTensor* projection_weights, const TfLiteTensor* projection_bias, const TfLiteLSTMParams* params, bool forward_sequence, int output_offset, TfLiteTensor* scratch_buffer, TfLiteTensor* activation_state, TfLiteTensor* cell_state, TfLiteTensor* output); TfLiteStatus EvalHybrid( const TfLiteTensor* input, const TfLiteTensor* input_to_input_weights, const TfLiteTensor* input_to_forget_weights, const TfLiteTensor* input_to_cell_weights, const TfLiteTensor* input_to_output_weights, const TfLiteTensor* recurrent_to_input_weights, const TfLiteTensor* recurrent_to_forget_weights, const TfLiteTensor* recurrent_to_cell_weights, const TfLiteTensor* recurrent_to_output_weights, const TfLiteTensor* cell_to_input_weights, const TfLiteTensor* cell_to_forget_weights, const TfLiteTensor* cell_to_output_weights, const TfLiteTensor* aux_input, const TfLiteTensor* aux_input_to_input_weights, const TfLiteTensor* aux_input_to_forget_weights, const TfLiteTensor* aux_input_to_cell_weights, const TfLiteTensor* aux_input_to_output_weights, const TfLiteTensor* input_gate_bias, const TfLiteTensor* forget_gate_bias, const TfLiteTensor* cell_bias, const TfLiteTensor* output_gate_bias, const TfLiteTensor* projection_weights, const TfLiteTensor* projection_bias, const TfLiteLSTMParams* params, bool forward_sequence, int output_offset, TfLiteTensor* scratch_buffer, TfLiteTensor* scaling_factors, TfLiteTensor* prod_scaling_factors, TfLiteTensor* recovered_cell_weights, TfLiteTensor* input_quantized, TfLiteTensor* aux_input_quantized, TfLiteTensor* output_state_quantized, TfLiteTensor* cell_state_quantized, TfLiteTensor* output_state, TfLiteTensor* cell_state, TfLiteTensor* output); } // namespace lstm_eval } // namespace builtin } // namespace ops } // namespace tflite #endif // TENSORFLOW_CONTRIB_LITE_KERNELS_LSTM_EVAL_H_