| 140 | } |
| 141 | |
| 142 | void EvalFloat(TfLiteContext* context, TfLiteNode* node, |
| 143 | TfLiteConvParams* params, OpData* data, |
| 144 | const TfLiteTensor* input, const TfLiteTensor* filter, |
| 145 | const TfLiteTensor* bias, TfLiteTensor* im2col, |
| 146 | TfLiteTensor* hwcn_weights, TfLiteTensor* output) { |
| 147 | float output_activation_min, output_activation_max; |
| 148 | CalculateActivationRange(params->activation, &output_activation_min, |
| 149 | &output_activation_max); |
| 150 | |
| 151 | ConvParams op_params; |
| 152 | op_params.padding_type = RuntimePaddingType(params->padding); |
| 153 | op_params.padding_values.width = data->padding.width; |
| 154 | op_params.padding_values.height = data->padding.height; |
| 155 | op_params.stride_width = params->stride_width; |
| 156 | op_params.stride_height = params->stride_height; |
| 157 | op_params.dilation_width_factor = params->dilation_width_factor; |
| 158 | op_params.dilation_height_factor = params->dilation_height_factor; |
| 159 | op_params.float_activation_min = output_activation_min; |
| 160 | op_params.float_activation_max = output_activation_max; |
| 161 | |
| 162 | reference_ops::Conv(op_params, GetTensorShape(input), |
| 163 | GetTensorData<float>(input), GetTensorShape(filter), |
| 164 | GetTensorData<float>(filter), GetTensorShape(bias), |
| 165 | GetTensorData<float>(bias), GetTensorShape(output), |
| 166 | GetTensorData<float>(output), GetTensorShape(im2col), |
| 167 | GetTensorData<float>(im2col)); |
| 168 | } |
| 169 | |
| 170 | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { |
| 171 | auto* params = reinterpret_cast<TfLiteConvParams*>(node->builtin_data); |
no test coverage detected