| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #ifndef TENSORFLOW_LITE_MICRO_KERNELS_DEPTHWISE_CONV_H_ |
| #define TENSORFLOW_LITE_MICRO_KERNELS_DEPTHWISE_CONV_H_ |
|
|
| #include <cstdint> |
|
|
| #include "edge-impulse-sdk/tensorflow/lite/c/builtin_op_data.h" |
| #include "edge-impulse-sdk/tensorflow/lite/c/common.h" |
| #include "edge-impulse-sdk/tensorflow/lite/kernels/internal/types.h" |
| #include "edge-impulse-sdk/tensorflow/lite/micro/kernels/conv.h" |
|
|
| namespace tflite { |
|
|
| extern const int kDepthwiseConvInputTensor; |
| extern const int kDepthwiseConvWeightsTensor; |
| extern const int kDepthwiseConvBiasTensor; |
| extern const int kDepthwiseConvOutputTensor; |
| extern const int kDepthwiseConvQuantizedDimension; |
|
|
| |
| |
| DepthwiseParams DepthwiseConvParamsFloat( |
| const TfLiteDepthwiseConvParams& params, const OpDataConv& data); |
|
|
| |
| |
| DepthwiseParams DepthwiseConvParamsQuantized( |
| const TfLiteDepthwiseConvParams& params, const OpDataConv& data); |
|
|
| TfLiteStatus CalculateOpDataDepthwiseConv( |
| TfLiteContext* context, TfLiteNode* node, |
| const TfLiteDepthwiseConvParams& params, int width, int height, |
| int filter_width, int filter_height, int out_width, int out_height, |
| const TfLiteType data_type, OpDataConv* data); |
|
|
| TfLiteStatus DepthwiseConvPrepare(TfLiteContext* context, TfLiteNode* node); |
|
|
| |
| |
| |
| TfLiteRegistration Register_DEPTHWISE_CONV_2D(); |
|
|
| #if defined(CMSIS_NN) |
| |
| |
| |
| TfLiteRegistration Register_DEPTHWISE_CONV_2D_INT8(); |
|
|
| |
| |
| |
| TfLiteRegistration Register_DEPTHWISE_CONV_2D_INT16(); |
|
|
| #else |
| inline TfLiteRegistration Register_DEPTHWISE_CONV_2D_INT8() { |
| return Register_DEPTHWISE_CONV_2D(); |
| } |
|
|
| inline TfLiteRegistration Register_DEPTHWISE_CONV_2D_INT16() { |
| return Register_DEPTHWISE_CONV_2D(); |
| } |
| #endif |
|
|
| } |
|
|
| #endif |
|
|