/AliOS-Things-master/components/ai_agent/src/engine/tflite-micro/tensorflow/lite/kernels/internal/reference/ |
A D | strided_slice.h | 45 const RuntimeShape input_shape = in StridedSlice() local 54 const int start_0 = StartForAxis(params_copy, input_shape, 0); in StridedSlice() 56 const int start_1 = StartForAxis(params_copy, input_shape, 1); in StridedSlice() 58 const int start_2 = StartForAxis(params_copy, input_shape, 2); in StridedSlice() 60 const int start_3 = StartForAxis(params_copy, input_shape, 3); in StridedSlice() 62 const int start_4 = StartForAxis(params_copy, input_shape, 4); in StridedSlice() 65 for (int offset_0 = start_0 * input_shape.Dims(1), in StridedSlice() 66 end_0 = stop_0 * input_shape.Dims(1), in StridedSlice() 67 step_0 = params_copy.strides[0] * input_shape.Dims(1); in StridedSlice() 71 end_1 = (offset_0 + stop_1) * input_shape.Dims(2), in StridedSlice() [all …]
|
A D | pooling.h | 30 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in AveragePool() 34 const int input_height = input_shape.Dims(1); in AveragePool() 35 const int input_width = input_shape.Dims(2); in AveragePool() 90 const int input_height = input_shape.Dims(1); in AveragePool() 91 const int input_width = input_shape.Dims(2); in AveragePool() 143 const int input_height = input_shape.Dims(1); in L2Pool() 144 const int input_width = input_shape.Dims(2); in L2Pool() 197 const int input_height = input_shape.Dims(1); in MaxPool() 198 const int input_width = input_shape.Dims(2); in MaxPool() 251 const int input_height = input_shape.Dims(1); in MaxPool() [all …]
|
A D | gather.h | 27 const RuntimeShape& input_shape, const T* input_data, in Gather() argument 33 axis += input_shape.DimensionsCount(); in Gather() 36 TFLITE_DCHECK_LT(axis, input_shape.DimensionsCount()); in Gather() 43 TFLITE_DCHECK_LT(batch_dims, input_shape.DimensionsCount()); in Gather() 47 TFLITE_DCHECK_EQ(input_shape.Dims(i), coords_shape.Dims(i)); in Gather() 50 const int axis_size = input_shape.Dims(axis); in Gather() 54 batch_size *= input_shape.Dims(i); in Gather() 59 outer_size *= input_shape.Dims(i); in Gather() 63 for (int i = axis + 1; i < input_shape.DimensionsCount(); ++i) { in Gather() 64 inner_size *= input_shape.Dims(i); in Gather()
|
A D | conv.h | 39 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in Conv() 45 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in Conv() 51 const int input_height = input_shape.Dims(1); in Conv() 52 const int input_width = input_shape.Dims(2); in Conv() 125 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in Conv() 134 const int input_height = input_shape.Dims(1); in Conv() 135 const int input_width = input_shape.Dims(2); in Conv() 189 const RuntimeShape& input_shape, const int8_t* input_data, in HybridConvPerChannel() argument 205 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in HybridConvPerChannel() 214 const int input_height = input_shape.Dims(1); in HybridConvPerChannel() [all …]
|
A D | resize_bilinear.h | 59 const RuntimeShape input_shape = in ResizeBilinear() local 66 int32_t batches = MatchingDim(input_shape, 0, output_shape, 0); in ResizeBilinear() 67 int32_t input_height = input_shape.Dims(1); in ResizeBilinear() 68 int32_t input_width = input_shape.Dims(2); in ResizeBilinear() 69 int32_t depth = MatchingDim(input_shape, 3, output_shape, 3); in ResizeBilinear() 147 const RuntimeShape input_shape = in ResizeBilinearInteger() local 155 const int32_t input_height = input_shape.Dims(1); in ResizeBilinearInteger() 156 const int32_t input_width = input_shape.Dims(2); in ResizeBilinearInteger() 196 input_data[Offset(input_shape, b, y0, x0, c)]) * in ResizeBilinearInteger() 201 input_data[Offset(input_shape, b, y1, x0, c)]) * in ResizeBilinearInteger() [all …]
|
A D | pad.h | 39 const RuntimeShape& input_shape, const T* input_data, in PadImpl() argument 43 RuntimeShape::ExtendedShape(PadKernelMaxDimensionCount(), input_shape); in PadImpl() 119 const RuntimeShape& input_shape, const T* input_data, in Pad() argument 122 PadImpl(op_params, input_shape, input_data, pad_value_ptr, output_shape, in Pad() 129 const RuntimeShape& input_shape, const T* input_data, in Pad() argument 133 PadImpl(op_params, input_shape, input_data, &converted_pad_value, in Pad() 140 const RuntimeShape& input_shape, const int32_t* input_data, in Pad() argument 143 PadImpl(op_params, input_shape, input_data, pad_value_ptr, output_shape, in Pad() 152 Pad(op_params, input_shape, input_data, pad_value_ptr, output_shape, in PadImageStyle() 158 const RuntimeShape& input_shape, in PadImageStyle() argument [all …]
|
A D | l2normalization.h | 30 const RuntimeShape& input_shape, 34 const int trailing_dim = input_shape.DimensionsCount() - 1; 36 MatchingFlatSizeSkipDim(input_shape, trailing_dim, output_shape); 38 MatchingDim(input_shape, trailing_dim, output_shape, trailing_dim); 54 const RuntimeShape& input_shape, in L2Normalization() argument 58 const int trailing_dim = input_shape.DimensionsCount() - 1; in L2Normalization() 60 MatchingDim(input_shape, trailing_dim, output_shape, trailing_dim); in L2Normalization() 62 MatchingFlatSizeSkipDim(input_shape, trailing_dim, output_shape); in L2Normalization()
|
A D | logistic.h | 30 inline void Logistic(const RuntimeShape& input_shape, const float* input_data, in Logistic() argument 35 const int flat_size = MatchingFlatSize(input_shape, output_shape); in Logistic() 61 inline void Logistic(const LogisticParams&, const RuntimeShape& input_shape, in Logistic() argument 65 Logistic(input_shape, input_data, output_shape, output_data); in Logistic() 69 const RuntimeShape& input_shape, const int16_t* input_data, in Logistic() argument 71 const int flat_size = MatchingFlatSize(input_shape, output_shape); in Logistic() 93 inline void Logistic(const RuntimeShape& input_shape, const int8_t* input_data, in Logistic() argument 100 const int flat_size = MatchingFlatSize(input_shape, output_shape); in Logistic()
|
A D | resize_nearest_neighbor.h | 57 const RuntimeShape input_shape = in ResizeNearestNeighbor() local 62 int32_t batches = MatchingDim(input_shape, 0, output_shape, 0); in ResizeNearestNeighbor() 63 int32_t input_height = input_shape.Dims(1); in ResizeNearestNeighbor() 64 int32_t input_width = input_shape.Dims(2); in ResizeNearestNeighbor() 65 int32_t depth = MatchingDim(input_shape, 3, output_shape, 3); in ResizeNearestNeighbor() 73 const int col_offset = input_shape.Dims(3); in ResizeNearestNeighbor() 74 const int row_offset = input_shape.Dims(2) * col_offset; in ResizeNearestNeighbor() 75 const int batch_offset = input_shape.Dims(1) * row_offset; in ResizeNearestNeighbor()
|
A D | transpose_conv.h | 26 const ConvParams& params, const RuntimeShape& input_shape, in TransposeConv() argument 35 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in TransposeConv() 41 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in TransposeConv() 44 const int input_height = input_shape.Dims(1); in TransposeConv() 45 const int input_width = input_shape.Dims(2); in TransposeConv() 85 input_shape, batch, in_y, in_x, in_channel)]; in TransposeConv() 115 const ConvParams& params, const RuntimeShape& input_shape, in TransposeConv() argument 125 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in TransposeConv() 131 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in TransposeConv() 134 const int input_height = input_shape.Dims(1); in TransposeConv() [all …]
|
A D | depthwiseconv_uint8.h | 93 const DepthwiseParams& params, const RuntimeShape& input_shape, in Run() 112 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in Run() 117 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in Run() 119 const int input_height = input_shape.Dims(1); in Run() 120 const int input_width = input_shape.Dims(2); in Run() 121 const int input_depth = input_shape.Dims(3); in Run() 199 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in RunPerChannel() 206 const int input_height = input_shape.Dims(1); in RunPerChannel() 207 const int input_width = input_shape.Dims(2); in RunPerChannel() 208 const int input_depth = input_shape.Dims(3); in RunPerChannel() [all …]
|
A D | conv3d.h | 24 inline void Conv3D(const Conv3DParams& params, const RuntimeShape& input_shape, in Conv3D() argument 29 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 5); in Conv3D() 33 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in Conv3D() 34 const int input_num_channels = MatchingDim(input_shape, 4, filter_shape, 3); in Conv3D() 41 const int input_width = input_shape.Dims(3); in Conv3D() 42 const int input_height = input_shape.Dims(2); in Conv3D() 43 const int input_depth = input_shape.Dims(1); in Conv3D() 86 input_shape, batch, in_d, in_y, in_x, in_channel)]; in Conv3D()
|
A D | tanh.h | 29 inline void Tanh(const RuntimeShape& input_shape, const float* input_data, in Tanh() argument 31 const int flat_size = MatchingFlatSize(input_shape, output_shape); in Tanh() 42 inline void Tanh(const TanhParams&, const RuntimeShape& input_shape, in Tanh() argument 46 Tanh(input_shape, input_data, output_shape, output_data); in Tanh() 49 inline void Tanh(const TanhParams& params, const RuntimeShape& input_shape, in Tanh() argument 58 const int flat_size = MatchingFlatSize(input_shape, output_shape); in Tanh() 83 inline void Tanh(const TanhParams& params, const RuntimeShape& input_shape, in Tanh() argument 91 const int flat_size = MatchingFlatSize(input_shape, output_shape); in Tanh()
|
A D | dequantize.h | 32 const RuntimeShape& input_shape, in Dequantize() argument 37 const int flat_size = MatchingFlatSize(input_shape, output_shape); in Dequantize() 50 const RuntimeShape& input_shape, const T* input_data, in PerChannelDequantize() argument 53 MatchingFlatSize(input_shape, output_shape); in PerChannelDequantize() 58 const int32_t num_dims = input_shape.DimensionsCount(); in PerChannelDequantize() 59 const int32_t* dims_data = input_shape.DimsData(); in PerChannelDequantize()
|
/AliOS-Things-master/components/ai_agent/src/engine/tflite-micro/tensorflow/lite/kernels/internal/reference/integer_ops/ |
A D | pooling.h | 25 const RuntimeShape& input_shape, in AveragePool() argument 30 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in AveragePool() 34 const int input_height = input_shape.Dims(1); in AveragePool() 35 const int input_width = input_shape.Dims(2); in AveragePool() 91 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in MaxPool() 95 const int input_height = input_shape.Dims(1); in MaxPool() 96 const int input_width = input_shape.Dims(2); in MaxPool() 150 const int input_height = input_shape.Dims(1); in AveragePool() 151 const int input_width = input_shape.Dims(2); in AveragePool() 211 const int input_height = input_shape.Dims(1); in MaxPool() [all …]
|
A D | depthwise_conv.h | 44 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in DepthwiseConvPerChannel() 51 const int input_height = input_shape.Dims(1); in DepthwiseConvPerChannel() 52 const int input_width = input_shape.Dims(2); in DepthwiseConvPerChannel() 53 const int input_depth = input_shape.Dims(3); in DepthwiseConvPerChannel() 141 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in DepthwiseConvPerChannel() 148 const int input_height = input_shape.Dims(1); in DepthwiseConvPerChannel() 149 const int input_width = input_shape.Dims(2); in DepthwiseConvPerChannel() 150 const int input_depth = input_shape.Dims(3); in DepthwiseConvPerChannel() 231 const int input_height = input_shape.Dims(1); in DepthwiseConvHybridPerChannel() 232 const int input_width = input_shape.Dims(2); in DepthwiseConvHybridPerChannel() [all …]
|
A D | conv.h | 26 const int32_t* output_shift, const RuntimeShape& input_shape, in ConvPerChannel() argument 47 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in ConvPerChannel() 50 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in ConvPerChannel() 51 const int input_depth = MatchingDim(input_shape, 3, filter_shape, 3); in ConvPerChannel() 58 const int input_height = input_shape.Dims(1); in ConvPerChannel() 59 const int input_width = input_shape.Dims(2); in ConvPerChannel() 131 const int32_t* output_shift, const RuntimeShape& input_shape, in ConvPerChannel() argument 150 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in ConvPerChannel() 153 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in ConvPerChannel() 161 const int input_height = input_shape.Dims(1); in ConvPerChannel() [all …]
|
A D | transpose_conv.h | 26 const int32_t* output_shift, const RuntimeShape& input_shape, in TransposeConv() argument 36 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in TransposeConv() 42 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in TransposeConv() 48 const int input_height = input_shape.Dims(1); in TransposeConv() 49 const int input_width = input_shape.Dims(2); in TransposeConv() 84 input_shape, batch, in_y, in_x, in_channel)]; in TransposeConv() 125 const int32_t* output_shift, const RuntimeShape& input_shape, in TransposeConv() argument 135 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in TransposeConv() 141 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in TransposeConv() 147 const int input_height = input_shape.Dims(1); in TransposeConv() [all …]
|
/AliOS-Things-master/components/ai_agent/src/engine/tflite-micro/tensorflow/lite/kernels/internal/optimized/ |
A D | im2col_utils.h | 139 const int input_height = input_shape.Dims(1); in DilatedIm2col() 140 const int input_width = input_shape.Dims(2); in DilatedIm2col() 225 const int input_depth = input_shape.Dims(3); in Im2col() 226 const int input_width = input_shape.Dims(2); in Im2col() 227 const int input_height = input_shape.Dims(1); in Im2col() 262 const int input_depth = input_shape.Dims(3); in Im2col() 263 const int input_width = input_shape.Dims(2); in Im2col() 388 const int input_depth = input_shape.Dims(1); in Im2col3D() 390 const int input_width = input_shape.Dims(3); in Im2col3D() 429 const int input_width = input_shape.Dims(3); in DilatedIm2col3D() [all …]
|
/AliOS-Things-master/components/ai_agent/src/engine/tflite-micro/tensorflow/lite/kernels/ |
A D | reshape_test_common.h | 47 ReshapeOpModel(std::initializer_list<int> input_shape, in ReshapeOpModel() argument 53 this->BuildWithTensorShape(input_shape, shape_shape, shape_data); in ReshapeOpModel() 56 this->BuildWithConstantTensorShape(input_shape, shape_shape, in ReshapeOpModel() 62 this->BuildWithHardcodedShape(input_shape, shape_data); in ReshapeOpModel() 81 void BuildWithHardcodedShape(std::initializer_list<int> input_shape, in BuildWithHardcodedShape() argument 83 input_ = this->AddInput({GetTensorType<T>(), input_shape}); in BuildWithHardcodedShape() 94 void BuildWithTensorShape(std::initializer_list<int> input_shape, in BuildWithTensorShape() argument 97 input_ = this->AddInput({GetTensorType<T>(), input_shape}); in BuildWithTensorShape() 114 void BuildWithConstantTensorShape(std::initializer_list<int> input_shape, in BuildWithConstantTensorShape() argument 117 input_ = this->AddInput({GetTensorType<T>(), input_shape}); in BuildWithConstantTensorShape()
|
/AliOS-Things-master/components/ai_agent/src/engine/tflite-micro/tensorflow/lite/kernels/internal/optimized/integer_ops/ |
A D | depthwise_conv_hybrid.h | 60 const int input_height = input_shape.Dims(1); in DepthwiseConvHybridGeneral() 61 const int input_width = input_shape.Dims(2); in DepthwiseConvHybridGeneral() 62 const int input_depth = input_shape.Dims(3); in DepthwiseConvHybridGeneral() 139 const int input_height_stride = input_shape.Dims(3) * input_shape.Dims(2); in DepthwiseConvHybridGeneral() 273 TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); in DepthwiseConvHybridWithRounding() 277 const int input_depth = input_shape.Dims(3); in DepthwiseConvHybridWithRounding() 312 params, input_scales, input_shape, input_data, in DepthwiseConvHybridWithRounding() 328 params, input_scales, input_shape, input_data, in DepthwiseConvHybridImpl() 352 input_shape(input_shape), in DepthwiseConvHybridWorkerTask() 377 const RuntimeShape& input_shape; member [all …]
|
A D | mean.h | 27 const RuntimeShape& input_shape, const int8_t* input_data, in MeanImpl() argument 38 const int input_height = input_shape.Dims(1); in MeanImpl() 39 const int input_width = input_shape.Dims(2); in MeanImpl() 68 input_data + Offset(input_shape, out_b, in_h, in_w, out_d); in MeanImpl() 150 input_shape(input_shape), in MeanWorkerTask() 161 MeanImpl(op_params, input_shape, input_data, multiplier, shift, bias, in Run() 167 const RuntimeShape& input_shape; member 189 const RuntimeShape input_shape = in Mean() local 203 const int input_height = input_shape.Dims(1); in Mean() 204 const int input_width = input_shape.Dims(2); in Mean() [all …]
|
/AliOS-Things-master/components/ai_agent/src/engine/tflite-micro/tensorflow/lite/experimental/mlir/testing/op_tests/ |
A D | identify_dilated_conv1d.py | 43 input_shape = parameters["input_shape"] 45 filter_shape = [filter_size, input_shape[2], parameters["num_filters"]] 46 return [input_shape, filter_shape] 50 input_shape, filter_shape = get_tensor_shapes(parameters) 54 dtype=tf.float32, name="input", shape=input_shape) 66 input_shape, filter_shape = get_tensor_shapes(parameters) 68 create_tensor_data(np.float32, input_shape, min_value=-1, max_value=1),
|
A D | identify_dilated_conv.py | 45 input_shape = parameters["input_shape"] 48 input_shape[3], parameters["channel_multiplier"] 50 return [input_shape, filter_shape] 54 input_shape, filter_shape = get_tensor_shapes(parameters) 56 dtype=tf.float32, name="input", shape=input_shape) 83 input_shape, filter_shape = get_tensor_shapes(parameters) 85 create_tensor_data(np.float32, input_shape, min_value=-1, max_value=1)
|
/AliOS-Things-master/components/ai_agent/src/engine/tflite-micro/tensorflow/lite/kernels/internal/optimized/sparse_ops/ |
A D | fully_connected.h | 32 const RuntimeShape& input_shape, const float* input_data, in FullyConnectedSparseWeight() argument 78 const RuntimeShape& input_shape, const float* input_data, in FullyConnectedSparseWeight1x4Impl() argument 88 const int input_dims_count = input_shape.DimensionsCount(); in FullyConnectedSparseWeight1x4Impl() 93 input_shape, input_dims_count - 1); in FullyConnectedSparseWeight1x4Impl() 118 const RuntimeShape& input_shape, const float* input_data, in FullyConnectedSparseWeight1x4Task() 125 input_shape(input_shape), in FullyConnectedSparseWeight1x4Task() 139 sparsity, params, input_shape, input_data, weights_shape, weights_data, in Run() 147 const RuntimeShape& input_shape; member 166 const RuntimeShape& input_shape, const float* input_data, in FullyConnectedSparseWeight1x4() argument 180 sparsity, params, input_shape, input_data, weights_shape, weights_data, in FullyConnectedSparseWeight1x4() [all …]
|