Home
last modified time | relevance | path

Searched refs:input_scale (Results 1 – 25 of 55) sorted by relevance

123

/external/XNNPACK/test/
Dsigmoid-nc.cc48 for (float input_scale = 1.0e-2f; input_scale < 1.0e+2f; input_scale *= 10.0f) { in TEST() local
52 .input_scale(input_scale) in TEST()
128 for (float input_scale = 1.0e-2f; input_scale < 1.0e+2f; input_scale *= 10.0f) { in TEST() local
132 .input_scale(input_scale) in TEST()
192 for (float input_scale = 1.0e-2f; input_scale < 1.0e+2f; input_scale *= 10.0f) { in TEST() local
198 .input_scale(input_scale) in TEST()
Dleaky-relu-operator-tester.h88 inline LeakyReLUOperatorTester& input_scale(float input_scale) { in input_scale() argument
89 assert(input_scale > 0.0f); in input_scale()
90 assert(std::isnormal(input_scale)); in input_scale()
91 this->input_scale_ = input_scale; in input_scale()
95 inline float input_scale() const { in input_scale() function
170 …const float x = input_scale() * (int32_t(input[i * input_stride() + c]) - int32_t(input_zero_point… in TestQ8()
186 input_zero_point(), input_scale(), in TestQ8()
Dsoftmax-operator-tester.h77 inline SoftMaxOperatorTester& input_scale(float input_scale) { in input_scale() argument
78 assert(input_scale > 0.0f); in input_scale()
79 assert(std::isnormal(input_scale)); in input_scale()
80 this->input_scale_ = input_scale; in input_scale()
84 inline float input_scale() const { in input_scale() function
135 input_scale()); in TestQ8()
140 input_scale()) / in TestQ8()
153 input_scale(), in TestQ8()
Dleaky-relu-nc.cc61 for (float input_scale = 1.0e-2f; input_scale < 1.0e+2f; input_scale *= 3.14159265f) { in TEST() local
65 .input_scale(input_scale) in TEST()
Dsigmoid-operator-tester.h77 inline SigmoidOperatorTester& input_scale(float input_scale) { in input_scale() argument
78 assert(input_scale > 0.0f); in input_scale()
79 assert(std::isnormal(input_scale)); in input_scale()
80 this->input_scale_ = input_scale; in input_scale()
84 inline float input_scale() const { in input_scale() function
147 const float x = input_scale() * in TestQ8()
165 input_zero_point(), input_scale(), in TestQ8()
Dsoftmax-nc.cc78 for (float input_scale = 1.0e-2f; input_scale < 1.0e+2f; input_scale *= 3.14159265f) { in TEST() local
82 .input_scale(input_scale) in TEST()
Dglobal-average-pooling-nwc.cc47 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) { in TEST() local
52 .input_scale(input_scale) in TEST()
166 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) { in TEST() local
171 .input_scale(input_scale) in TEST()
Dglobal-average-pooling-operator-tester.h86 inline GlobalAveragePoolingOperatorTester& input_scale(float input_scale) { in input_scale() argument
87 assert(input_scale > 0.0f); in input_scale()
88 assert(std::isnormal(input_scale)); in input_scale()
89 this->input_scale_ = input_scale; in input_scale()
93 inline float input_scale() const { in input_scale() function
166 const double scale = double(input_scale()) / (double(width()) * double(output_scale())); in TestNWCxQ8()
186 input_zero_point(), input_scale(), in TestNWCxQ8()
/external/tensorflow/tensorflow/lite/micro/kernels/
Darg_min_max_test.cc98 float input_scale, int input_zero_point, in TestArgMinMaxQuantized() argument
113 input_scale, input_zero_point, "input_tensor"), in TestArgMinMaxQuantized()
166 float input_scale = 0.5; in TF_LITE_MICRO_TEST() local
171 input_dims, input_values, input_quantized, input_scale, input_zero_point, in TF_LITE_MICRO_TEST()
185 float input_scale = 0.5; in TF_LITE_MICRO_TEST() local
190 input_dims, input_values, input_quantized, input_scale, input_zero_point, in TF_LITE_MICRO_TEST()
204 float input_scale = 0.5; in TF_LITE_MICRO_TEST() local
209 input_dims, input_values, input_quantized, input_scale, input_zero_point, in TF_LITE_MICRO_TEST()
223 float input_scale = 0.5; in TF_LITE_MICRO_TEST() local
228 input_dims, input_values, input_quantized, input_scale, input_zero_point, in TF_LITE_MICRO_TEST()
[all …]
Ddepthwise_conv_test.cc127 uint8_t* input_quantized, float input_scale, int input_zero_point, in TestDepthwiseConvQuantizedPerLayer() argument
145 input_dims, input_scale, in TestDepthwiseConvQuantizedPerLayer()
151 bias_dims, input_scale, in TestDepthwiseConvQuantizedPerLayer()
166 float bias_scales[] = {1, filter_scale * input_scale}; in TestDepthwiseConvQuantizedPerLayer()
180 int8_t* input_quantized, float input_scale, int input_zero_point, in TestDepthwiseConvQuantizedPerChannel() argument
202 input_scale, input_zero_point, "input_tensor"); in TestDepthwiseConvQuantizedPerChannel()
208 bias_data, bias_data_quantized, bias_dims, input_scale, &filter_scales[1], in TestDepthwiseConvQuantizedPerChannel()
216 float input_scales[] = {1, input_scale}; in TestDepthwiseConvQuantizedPerChannel()
295 const float input_scale = 0.5f; in TF_LITE_MICRO_TEST() local
309 input_shape, input_values, input_quantized, input_scale, input_zero_point, in TF_LITE_MICRO_TEST()
[all …]
Dconv_test.cc141 uint8_t* input_quantized, float input_scale, const int* filter_dims_data, in TestConvQuantizedPerLayer() argument
161 input_scale, 128, "input_tensor"), in TestConvQuantizedPerLayer()
165 input_scale, filter_scale, "bias_tensor"), in TestConvQuantizedPerLayer()
185 int8_t* input_quantized, float input_scale, int input_zero_point, in TestConvQuantizedPerChannel() argument
205 input_scale, input_zero_point, "input_tensor"); in TestConvQuantizedPerChannel()
211 bias_data, bias_data_quantized, bias_dims, input_scale, &filter_scales[1], in TestConvQuantizedPerChannel()
219 float input_scales[] = {1, input_scale}; in TestConvQuantizedPerChannel()
290 const float input_scale = 0.5f; in TF_LITE_MICRO_TEST() local
301 input_quantized, input_scale, tflite::testing::kFilterShape, in TF_LITE_MICRO_TEST()
313 const float input_scale = 0.5f; in TF_LITE_MICRO_TEST() local
[all …]
Dpad_test.cc167 T* input_quantized, float input_scale, in TestPadQuantized() argument
182 input_scale, input_zero_point, "input_tensor"), in TestPadQuantized()
200 T* input_quantized, float input_scale, in TestPadV2Quantized() argument
221 input_scale, input_zero_point, "input_tensor"), in TestPadV2Quantized()
300 const float input_scale = 1.0f; in TF_LITE_MICRO_TEST() local
314 input_dims, input_values, input_quantized, input_scale, input_zero_point, in TF_LITE_MICRO_TEST()
322 const float input_scale = 1.0f; in TF_LITE_MICRO_TEST() local
339 input_dims, input_values, input_quantized, input_scale, input_zero_point, in TF_LITE_MICRO_TEST()
348 const float input_scale = 1.0f; in TF_LITE_MICRO_TEST() local
362 input_dims, input_values, input_quantized, input_scale, input_zero_point, in TF_LITE_MICRO_TEST()
[all …]
Dactivations_test.cc139 uint8_t* input_data_quantized, const float input_scale, in TestReluUint8() argument
153 input_scale, input_zero_point, "input_tensor"), in TestReluUint8()
204 uint8_t* input_data_quantized, const float input_scale, in TestRelu6Uint8() argument
218 input_scale, input_zero_point, "input_tensor"), in TestRelu6Uint8()
269 int8_t* input_data_quantized, const float input_scale, in TestReluInt8() argument
282 input_scale, input_zero_point, "input_tensor"), in TestReluInt8()
335 int8_t* input_data_quantized, const float input_scale, in TestRelu6Int8() argument
348 input_scale, input_zero_point, "input_tensor"), in TestRelu6Int8()
445 const float input_scale = 0.5f; in TF_LITE_MICRO_TEST() local
451 input_scale, input_zero_point, golden, in TF_LITE_MICRO_TEST()
[all …]
/external/tensorflow/tensorflow/lite/kernels/internal/
Dlogsoftmax_quantized_test.cc39 int32 input_offset, const double input_scale, in RunLogSoftmaxFloatReference() argument
50 dq_params.scale = input_scale; in RunLogSoftmaxFloatReference()
72 int32 input_offset, const double input_scale, in RunLogSoftmaxFloatReference() argument
83 dq_params.scale = input_scale; in RunLogSoftmaxFloatReference()
148 const double input_scale, int stride, float beta) { in RunOneLogSoftmaxTest() argument
155 input_scale, stride, beta, in RunOneLogSoftmaxTest()
164 beta, input_scale, kScaledDiffIntegerBits, &input_beta_multiplier, in RunOneLogSoftmaxTest()
184 optimized_ops::PopulateSoftmaxLookupTable(&params, input_scale, beta); in RunOneLogSoftmaxTest()
185 optimized_ops::LogSoftmax(params, input_scale, shape_common, input_data, in RunOneLogSoftmaxTest()
206 const double input_scale, int stride, float beta) { in RunOneLogSoftmaxTest() argument
[all …]
Dsoftmax_quantized_test.cc39 int32 input_offset, const double input_scale, in RunSoftmaxFloatReference() argument
50 dq_params.scale = input_scale; in RunSoftmaxFloatReference()
106 const double input_scale, int stride, float beta) { in RunOneSoftmaxTest() argument
112 RunSoftmaxFloatReference(input_data, shape_common, input_offset, input_scale, in RunOneSoftmaxTest()
118 tflite::PreprocessSoftmaxScaling(beta, input_scale, kScaledDiffIntegerBits, in RunOneSoftmaxTest()
134 optimized_ops::PopulateSoftmaxLookupTable(&params, input_scale, beta); in RunOneSoftmaxTest()
166 const double input_scale = std::pow(10.0, UniformRandomFloat(-2.0, 1.0)); in TryOneUniformSoftmax() local
176 RunOneSoftmaxTest(input_data.data(), shape_common, input_offset, input_scale, in TryOneUniformSoftmax()
185 const double input_scale, int stride, float beta) { in RunOneSoftmaxTestInt8() argument
193 tflite::PreprocessSoftmaxScaling(beta, input_scale, kScaledDiffIntegerBits, in RunOneSoftmaxTestInt8()
[all …]
Dquantization_util.cc268 void PreprocessSoftmaxScaling(double beta, double input_scale, in PreprocessSoftmaxScaling() argument
281 const double input_beta = IntegerDoubleMultiply(beta, input_scale); in PreprocessSoftmaxScaling()
292 beta * input_scale * (1 << (31 - input_integer_bits)), (1ll << 31) - 1.0); in PreprocessSoftmaxScaling()
299 void PreprocessLogSoftmaxScalingExp(double beta, double input_scale, in PreprocessLogSoftmaxScalingExp() argument
305 PreprocessSoftmaxScaling(beta, input_scale, input_integer_bits, in PreprocessLogSoftmaxScalingExp()
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/integer_ops/
Ddepthwise_conv_hybrid_3x3_filter.h129 static inline void Run(const float* input_scale,
1028 [input_scale] "r"(input_scale),
1064 static inline void Run(const float* input_scale, const int8* input_ptr,
2034 [input_scale] "r"(input_scale),
2072 static inline void Run(const float* input_scale, const int8* input_ptr,
2171 [params_ptr] "r"(params_ptr), [input_scale] "r"(input_scale)
2188 static inline void Run(const float* input_scale, const int8* input_ptr,
2340 [input_scale] "r"(input_scale),
2358 static inline void Run(const float* input_scale, const int8* input_ptr,
2545 [input_scale] "r"(input_scale), [params_ptr] "r"(params_ptr)
[all …]
/external/tensorflow/tensorflow/lite/micro/
Dtesting_helpers_test.cc22 float input_scale = 0.5; in TF_LITE_MICRO_TEST() local
34 pre_quantized, quantized, dims, input_scale, weight_scale, tensor_name); in TF_LITE_MICRO_TEST()
39 TF_LITE_MICRO_EXPECT_EQ(result.params.scale, input_scale * weight_scale); in TF_LITE_MICRO_TEST()
46 float input_scale = 0.5; in TF_LITE_MICRO_TEST() local
62 pre_quantized, quantized, dims, input_scale, weight_scales, scales, in TF_LITE_MICRO_TEST()
68 TF_LITE_MICRO_EXPECT_EQ(scales[i + 1], input_scale * weight_scales[i]); in TF_LITE_MICRO_TEST()
/external/XNNPACK/src/
Dglobal-average-pooling-nwc.c28 float input_scale, in xnn_create_global_average_pooling_nwc_q8() argument
69 if (input_scale <= 0.0f || !isnormal(input_scale)) { in xnn_create_global_average_pooling_nwc_q8()
73 input_scale); in xnn_create_global_average_pooling_nwc_q8()
95 const float input_output_scale = input_scale / output_scale; in xnn_create_global_average_pooling_nwc_q8()
125 global_average_pooling_op->input_scale = input_scale; in xnn_create_global_average_pooling_nwc_q8()
276 …global_average_pooling_op->input_scale / (global_average_pooling_op->output_scale * (float) width), in xnn_setup_global_average_pooling_nwc_q8()
Dleaky-relu-nc.c27 float input_scale, in xnn_create_leaky_relu_nc_q8() argument
80 if (input_scale <= 0.0f || !isnormal(input_scale)) { in xnn_create_leaky_relu_nc_q8()
83 input_scale); in xnn_create_leaky_relu_nc_q8()
104 const float input_output_scale = input_scale / output_scale; in xnn_create_leaky_relu_nc_q8()
Dsoftmax-nc.c26 float input_scale, in xnn_create_softmax_nc_q8() argument
64 if (input_scale <= 0.0f || !isnormal(input_scale)) { in xnn_create_softmax_nc_q8()
67 input_scale); in xnn_create_softmax_nc_q8()
112 const double scaled_exp_xi = qscale * exp((double) (i - 255) * (double) input_scale); in xnn_create_softmax_nc_q8()
Dsigmoid-nc.c26 float input_scale, in xnn_create_sigmoid_nc_q8() argument
66 if (input_scale <= 0.0f || !isnormal(input_scale)) { in xnn_create_sigmoid_nc_q8()
69 input_scale); in xnn_create_sigmoid_nc_q8()
121 const float x = input_scale * (float) (i - (int32_t) (uint32_t) input_zero_point); in xnn_create_sigmoid_nc_q8()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dfake_quantize_ops.cc73 const xla::XlaOp& input_scale) { in Quantize() argument
75 xla::XlaOp inv_scale = xla::Div(one, input_scale); in Quantize()
82 return xla::Add(xla::Mul(rounded, input_scale), nudged_input_min); in Quantize()
154 xla::XlaOp input_scale = in Compile() local
157 nudged_input_max, input_scale); in Compile()
255 xla::XlaOp nudged_input_min, nudged_input_max, input_scale; in Compile() local
257 &nudged_input_min, &nudged_input_max, &input_scale); in Compile()
260 nudged_input_max, input_scale); in Compile()
300 xla::XlaOp nudged_input_min, nudged_input_max, input_scale; in Compile() local
302 &nudged_input_min, &nudged_input_max, &input_scale); in Compile()
/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Dconcatenation.h81 const float* input_scale = params.input_scale; in ConcatenationWithScaling() local
118 input_scale[i] == output_scale) { in ConcatenationWithScaling()
121 const float scale = input_scale[i] * inverse_output_scale; in ConcatenationWithScaling()
/external/tensorflow/tensorflow/lite/tools/optimize/
Dquantization_utils_test.cc391 const float input_scale = 0.05; in TEST_F() local
399 input_scale, &error_reporter_); in TEST_F()
408 0.6 * input_scale * new_scales[0]); in TEST_F()
413 0.6 * input_scale * new_scales[1]); in TEST_F()
437 const float input_scale = 0.05; in TEST_F() local
445 input_scale, &error_reporter_); in TEST_F()
454 0.6 * input_scale * new_scales[0]); in TEST_F()
646 const float input_scale = 0.5; in TEST_F() local
665 input_scale * weight_scale, &error_reporter_), in TEST_F()
669 weight_scale * input_scale); in TEST_F()
[all …]

123