tensorflow/lite/tools/optimize/calibration/calibrator.cc
// Get the logging kernel if there are any.
// TODO(jianlijianli): extend this to support multiple recipe for the same
// model.
Get the logging kernel if there are any.
TODO(jianlijianli): extend this to support multiple recipe for the same
model.
Get the logging kernel if there are any . TODO ( jianlijianli ) : extend this to support multiple recipe for the same model .
logging_kernel_func_ptr GetLoggingEvalFunc(TfLiteContext* context,
                                           TfLiteNode* node,
                                           int builtin_op_code) {
  switch (builtin_op_code) {
    case BuiltinOperator_LSTM: {
      if (node->intermediates->size == 12) {
        return tflite::optimize::calibration::custom::lstm_logging_kernel;
      }
      return tflite::optimize::calibration::builtin::lstm_logging_kernel;
    }
    case BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_LSTM:
      return tflite::optimize::calibration::builtin::
          unidirectional_sequence_lstm_logging_kernel;
    default:
      return nullptr;
  }
}
logging_kernel_func_ptr GetLoggingEvalFunc ( TfLiteContext * context , TfLiteNode * node , int builtin_op_code ) { switch ( builtin_op_code ) { case BuiltinOperator_LSTM : { if ( node -> intermediates -> size == 12 ) { return tflite :: optimize :: calibration :: custom :: lstm_logging_kernel ; } return tflite :: optimize :: calibration :: builtin :: lstm_logging_kernel ; } case BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_LSTM : return tflite :: optimize :: calibration :: builtin :: unidirectional_sequence_lstm_logging_kernel ; default : return nullptr ; } }
Get the logging kernel if there are any.
Get the logging kernel if there are any .