Home
last modified time | relevance | path

Searched refs:scales (Results 1 – 25 of 152) sorted by relevance

1234567

/external/libtextclassifier/native/annotator/
Dquantization_test.cc40 std::vector<float> scales{{0.1, 9.0, -7.0}}; in TEST() local
51 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding, in TEST()
69 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding, in TEST()
92 std::vector<float> scales(num_buckets); in TEST() local
94 std::fill(scales.begin(), scales.end(), 1); in TEST()
98 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding, in TEST()
115 std::vector<float> scales(num_buckets, 1.0); in TEST() local
119 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding, in TEST()
135 std::vector<float> scales(num_buckets, 1.0); in TEST() local
136 scales[1] = 9.0; in TEST()
[all …]
Dquantization.cc28 void DequantizeAdd8bit(const float* scales, const uint8* embeddings, in DequantizeAdd8bit() argument
32 const float multiplier = scales[bucket_id]; in DequantizeAdd8bit()
40 void DequantizeAddNBit(const float* scales, const uint8* embeddings, in DequantizeAddNBit() argument
45 const float multiplier = scales[bucket_id]; in DequantizeAddNBit()
73 bool DequantizeAdd(const float* scales, const uint8* embeddings, in DequantizeAdd() argument
78 DequantizeAdd8bit(scales, embeddings, bytes_per_embedding, in DequantizeAdd()
81 DequantizeAddNBit(scales, embeddings, bytes_per_embedding, in DequantizeAdd()
Dmodel-executor.cc71 const TfLiteTensor* scales = interpreter->tensor(1); in FromBuffer() local
72 if (scales->dims->size != 2 || scales->dims->data[0] != num_buckets || in FromBuffer()
73 scales->dims->data[1] != 1) { in FromBuffer()
85 embedding_size, scales, embeddings, std::move(interpreter), in FromBuffer()
92 const TfLiteTensor* scales, const TfLiteTensor* embeddings, in TFLiteEmbeddingExecutor() argument
100 scales_(scales), in TFLiteEmbeddingExecutor()
/external/tensorflow/tensorflow/lite/micro/kernels/
Dadd_test.cc258 const float scales[] = {0.25, 0.5, 1.0}; in TF_LITE_MICRO_TEST() local
272 inout_shape, input1_values, input1_quantized, scales[0], zero_points[0], in TF_LITE_MICRO_TEST()
273 inout_shape, input2_values, input2_quantized, scales[1], zero_points[1], in TF_LITE_MICRO_TEST()
274 inout_shape, golden_values, golden_quantized, scales[2], zero_points[2], in TF_LITE_MICRO_TEST()
279 const float scales[] = {0.25, 0.5, 1.0}; in TF_LITE_MICRO_TEST() local
293 inout_shape, input1_values, input1_quantized, scales[0], zero_points[0], in TF_LITE_MICRO_TEST()
294 inout_shape, input2_values, input2_quantized, scales[1], zero_points[1], in TF_LITE_MICRO_TEST()
295 inout_shape, golden_values, golden_quantized, scales[2], zero_points[2], in TF_LITE_MICRO_TEST()
300 const float scales[] = {0.25, 0.5, 1.0}; in TF_LITE_MICRO_TEST() local
314 inout_shape, input1_values, input1_quantized, scales[0], zero_points[0], in TF_LITE_MICRO_TEST()
[all …]
/external/tensorflow/tensorflow/lite/testing/op_tests/
Dnearest_upsample.py37 def new_shape_for_upsample(original_shape, scales, axis): argument
46 if j < len(scales) and axis[j] == i:
48 ones_new_shape.append(scales[j])
49 upsample_new_shape.append(original_shape[i] * scales[j])
60 scales, axis = parameters["scale_n_axis"]
62 input_shape, scales, axis)
/external/dng_sdk/source/
Ddng_misc_opcodes.cpp1277 uint32 scales = SafeUint32DivideUp (fAreaSpec.Area ().H (), in dng_opcode_ScalePerRow() local
1280 if (scales != stream.Get_uint32 ()) in dng_opcode_ScalePerRow()
1285 if (dataSize != dng_area_spec::kDataSize + 4 + scales * 4) in dng_opcode_ScalePerRow()
1290 fTable.Reset (host.Allocate (SafeUint32Mult (scales, in dng_opcode_ScalePerRow()
1295 for (uint32 j = 0; j < scales; j++) in dng_opcode_ScalePerRow()
1305 printf ("Count: %u\n", (unsigned) scales); in dng_opcode_ScalePerRow()
1307 for (uint32 k = 0; k < scales && k < gDumpLineLimit; k++) in dng_opcode_ScalePerRow()
1312 if (scales > gDumpLineLimit) in dng_opcode_ScalePerRow()
1314 printf (" ... %u scales skipped\n", (unsigned) (scales - gDumpLineLimit)); in dng_opcode_ScalePerRow()
1328 uint32 scales = SafeUint32DivideUp (fAreaSpec.Area ().H (), in PutData() local
[all …]
/external/tensorflow/tensorflow/lite/tools/optimize/
Dquantization_utils.cc154 std::vector<float>* scales, in GetSymmetricScalesFromMaxMin() argument
165 if (scales->size() != quant_params->min.size()) { in GetSymmetricScalesFromMaxMin()
177 scales->at(channel_idx) = half_range / kMaxQuantizedValue; in GetSymmetricScalesFromMaxMin()
312 std::vector<float> scales(1, scaling_factor); in SymmetricQuantizeFloatsToInt16() local
314 return AddQuantizationParams(scales, zero_points, 0, uint8_buffer, in SymmetricQuantizeFloatsToInt16()
473 TfLiteStatus AddQuantizationParams(const std::vector<float>& scales, in AddQuantizationParams() argument
483 tensor->quantization->scale.assign(scales.begin(), scales.end()); in AddQuantizationParams()
484 if (zero_point.size() != scales.size()) { in AddQuantizationParams()
488 zero_point.size(), scales.size()); in AddQuantizationParams()
522 std::vector<float> scales(channel_dim_size); in SymmetricQuantizeTensorPerChannel() local
[all …]
Dquantization_utils_test.cc361 std::vector<float> scales = std::vector<float>(quantization->min.size()); in TEST_F() local
363 GetSymmetricScalesFromMaxMin(quantization.get(), &scales, &error_reporter_); in TEST_F()
367 EXPECT_EQ(scales, expected_scales); in TEST_F()
384 std::vector<float> scales = std::vector<float>(quant_params->min.size()); in TEST_F() local
386 GetSymmetricScalesFromMaxMin(quant_params.get(), &scales, &error_reporter_); in TEST_F()
389 EXPECT_EQ(scales, expected_scales); in TEST_F()
406 EXPECT_TRUE(new_scales[0] > scales[0]); in TEST_F()
432 std::vector<float> scales = std::vector<float>(quant_params->min.size()); in TEST_F() local
433 GetSymmetricScalesFromMaxMin(quant_params.get(), &scales, &error_reporter_); in TEST_F()
435 EXPECT_EQ(scales, expected_scales); in TEST_F()
[all …]
/external/skqp/src/gpu/gradients/
DGrUnrolledBinaryGradientColorizer.fp137 // The raster implementation also uses scales and biases, but since they must be calculated
139 SkPMColor4f scales[kMaxIntervals];
168 scale.store(scales + intervalCount);
176 scales[i] = SK_PMColor4fTRANSPARENT;
182 intervalCount, scales[0], scales[1], scales[2], scales[3], scales[4], scales[5],
183 scales[6], scales[7], biases[0], biases[1], biases[2], biases[3], biases[4],
DGrUnrolledBinaryGradientColorizer.cpp332 SkPMColor4f scales[kMaxIntervals]; in Make() local
361 scale.store(scales + intervalCount); in Make()
369 scales[i] = SK_PMColor4fTRANSPARENT; in Make()
375 intervalCount, scales[0], scales[1], scales[2], scales[3], scales[4], scales[5], in Make()
376 scales[6], scales[7], biases[0], biases[1], biases[2], biases[3], biases[4], biases[5], in Make()
/external/skia/src/gpu/gradients/
DGrUnrolledBinaryGradientColorizer.fp137 // The raster implementation also uses scales and biases, but since they must be calculated
139 SkPMColor4f scales[kMaxIntervals];
168 scale.store(scales + intervalCount);
176 scales[i] = SK_PMColor4fTRANSPARENT;
182 intervalCount, scales[0], scales[1], scales[2], scales[3], scales[4], scales[5],
183 scales[6], scales[7], biases[0], biases[1], biases[2], biases[3], biases[4],
/external/tensorflow/tensorflow/lite/micro/
Dtesting_helpers_test.cc53 float scales[channels + 1]; 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()
93 float scales[channels + 1]; in TF_LITE_MICRO_TEST() local
97 pre_quantized, quantized, dims, scales, zero_points, &quant, 0, in TF_LITE_MICRO_TEST()
/external/skia/tests/
DMatrixTest.cpp169 SkScalar scales[2]; in test_matrix_min_max_scale() local
176 success = identity.getMinMaxScales(scales); in test_matrix_min_max_scale()
177 REPORTER_ASSERT(reporter, success && 1 == scales[0] && 1 == scales[1]); in test_matrix_min_max_scale()
183 success = scale.getMinMaxScales(scales); in test_matrix_min_max_scale()
184 REPORTER_ASSERT(reporter, success && 2 == scales[0] && 4 == scales[1]); in test_matrix_min_max_scale()
190 success = rot90Scale.getMinMaxScales(scales); in test_matrix_min_max_scale()
191 … REPORTER_ASSERT(reporter, success && SK_Scalar1 / 4 == scales[0] && SK_Scalar1 / 2 == scales[1]); in test_matrix_min_max_scale()
197 success = rotate.getMinMaxScales(scales); in test_matrix_min_max_scale()
199 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(1, scales[0], SK_ScalarNearlyZero)); in test_matrix_min_max_scale()
200 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(1, scales[1], SK_ScalarNearlyZero)); in test_matrix_min_max_scale()
[all …]
/external/skia/gm/
Dimagefiltersscaled.cpp118 SkVector scales[] = { in onDraw() local
131 for (size_t j = 0; j < SK_ARRAY_COUNT(scales); ++j) { in onDraw()
139 canvas->scale(scales[j].fX, scales[j].fY); in onDraw()
149 canvas->translate(r.width() * scales[j].fX + margin, 0); in onDraw()
152 canvas->translate(0, r.height() * scales[j].fY + margin); in onDraw()
Ddftext.cpp59 SkScalar scales[] = { 2.0f*5.0f, 5.0f, 2.0f, 1.0f }; in onDraw() local
91 canvas->scale(scales[i], scales[i]); in onDraw()
94 y += font.getMetrics(nullptr)*scales[i]; in onDraw()
120 SkScalar scaleFactor = SkScalarInvert(scales[arraySize - i - 1]); in onDraw()
/external/skqp/gm/
Dimagefiltersscaled.cpp118 SkVector scales[] = { in onDraw() local
131 for (size_t j = 0; j < SK_ARRAY_COUNT(scales); ++j) { in onDraw()
139 canvas->scale(scales[j].fX, scales[j].fY); in onDraw()
149 canvas->translate(r.width() * scales[j].fX + margin, 0); in onDraw()
152 canvas->translate(0, r.height() * scales[j].fY + margin); in onDraw()
Dblurrect.cpp116 SkScalar scales[] = { SK_Scalar1, 0.6f }; in onDraw() local
118 for (size_t s = 0; s < SK_ARRAY_COUNT(scales); ++s) { in onDraw()
133 canvas->scale(scales[s], scales[s]); in onDraw()
143 canvas->translate(0, SK_ARRAY_COUNT(procs) * r.height() * 4/3 * scales[s]); in onDraw()
146 canvas->translate(4 * r.width() * 4/3 * scales[s], 0); in onDraw()
Ddftext.cpp43 SkScalar scales[] = { 2.0f*5.0f, 5.0f, 2.0f, 1.0f }; in onDraw() local
75 canvas->scale(scales[i], scales[i]); in onDraw()
78 y += font.getMetrics(nullptr)*scales[i]; in onDraw()
104 SkScalar scaleFactor = SkScalarInvert(scales[arraySize - i - 1]); in onDraw()
/external/skia/src/gpu/gradients/generated/
DGrUnrolledBinaryGradientColorizer.cpp333 SkPMColor4f scales[kMaxIntervals]; in Make() local
362 scale.store(scales + intervalCount); in Make()
370 scales[i] = SK_PMColor4fTRANSPARENT; in Make()
376 intervalCount, scales[0], scales[1], scales[2], scales[3], scales[4], scales[5], in Make()
377 scales[6], scales[7], biases[0], biases[1], biases[2], biases[3], biases[4], biases[5], in Make()
/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/
Dquantization_utils.cc75 ArrayRef<double> scales = qtype.getScales(); in RescaleQuantizedType() local
77 if (scales.size() != factor_values.getNumElements()) return {}; in RescaleQuantizedType()
79 new_scales.reserve(scales.size()); in RescaleQuantizedType()
80 auto scales_iter = scales.begin(); in RescaleQuantizedType()
154 SmallVector<double, 4> scales(qtype.getScales().begin(), in ResetAxisAndBroadcast() local
169 if (BroadcastVector<double>(shaped.getDimSize(quant_dim), scales) || in ResetAxisAndBroadcast()
175 scales, zero_points, quant_dim, qtype.getStorageTypeMin(), in ResetAxisAndBroadcast()
346 llvm::SmallVector<double, 4> scales(axis_size, 1.0); in GetUniformQuantizedTypeForBias() local
350 scales[index_scale.index()] *= index_scale.value(); in GetUniformQuantizedTypeForBias()
354 scales[index] *= type.getScale(); in GetUniformQuantizedTypeForBias()
[all …]
/external/skqp/tests/
DMatrixTest.cpp169 SkScalar scales[2]; in test_matrix_min_max_scale() local
176 success = identity.getMinMaxScales(scales); in test_matrix_min_max_scale()
177 REPORTER_ASSERT(reporter, success && SK_Scalar1 == scales[0] && SK_Scalar1 == scales[1]); in test_matrix_min_max_scale()
183 success = scale.getMinMaxScales(scales); in test_matrix_min_max_scale()
184 … REPORTER_ASSERT(reporter, success && SK_Scalar1 * 2 == scales[0] && SK_Scalar1 * 4 == scales[1]); in test_matrix_min_max_scale()
191 success = rot90Scale.getMinMaxScales(scales); in test_matrix_min_max_scale()
192 … REPORTER_ASSERT(reporter, success && SK_Scalar1 / 4 == scales[0] && SK_Scalar1 / 2 == scales[1]); in test_matrix_min_max_scale()
198 success = rotate.getMinMaxScales(scales); in test_matrix_min_max_scale()
200 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(SK_Scalar1, scales[0], SK_ScalarNearlyZero)); in test_matrix_min_max_scale()
201 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(SK_Scalar1, scales[1], SK_ScalarNearlyZero)); in test_matrix_min_max_scale()
[all …]
/external/skqp/src/gpu/effects/
DGrYUVtoRGBEffect.h36 GrYUVtoRGBEffect(const sk_sp<GrTextureProxy> proxies[], const SkSize scales[], in GrYUVtoRGBEffect() argument
44 fSamplerTransforms[i] = SkMatrix::MakeScale(scales[i].width(), scales[i].height()); in GrYUVtoRGBEffect()
/external/skia/src/gpu/tessellate/
DGrTessellatePathOp.cpp35 SkScalar scales[2]; in onPrepare() local
36 SkAssertResult(fViewMatrix.getMinMaxScales(scales)); // Will fail if perspective. in onPrepare()
42 float gpuFragmentWork = bounds.height() * scales[0] * bounds.width() * scales[1]; in onPrepare()
76 float rasterEdgeWork = (bounds.height() + bounds.width()) * scales[1] * fPath.countVerbs(); in onPrepare()
/external/tensorflow/tensorflow/examples/android/jni/object_tracking/
Dframe_pair.cc152 Point2f* const scales) const { in FillScales()
177 scales[i].x = dist2_x / dist1_x; in FillScales()
178 scales[i].y = dist2_y / dist1_y; in FillScales()
182 scales[i].x = 1.0f; in FillScales()
183 scales[i].y = 1.0f; in FillScales()
/external/mesa3d/src/gallium/auxiliary/gallivm/
Dlp_bld_format_aos.c229 LLVMValueRef scales[4]; in lp_build_unpack_arith_rgba_aos() local
271 scales[i] = LLVMConstNull(LLVMFloatTypeInContext(gallivm->context)); in lp_build_unpack_arith_rgba_aos()
286 scales[i] = lp_build_const_float(gallivm, 1.0 / mask); in lp_build_unpack_arith_rgba_aos()
290 scales[i] = lp_build_const_float(gallivm, 1.0); in lp_build_unpack_arith_rgba_aos()
322 scales[i] = lp_build_const_float(gallivm, 1.0 / mask); in lp_build_unpack_arith_rgba_aos()
347 scaled = LLVMBuildFMul(builder, casted, LLVMConstVector(scales, 4), ""); in lp_build_unpack_arith_rgba_aos()
374 LLVMValueRef scales[4]; in lp_build_pack_rgba_aos() local
407 scales[i] = LLVMGetUndef(LLVMFloatTypeInContext(gallivm->context)); in lp_build_pack_rgba_aos()
418 scales[i] = lp_build_const_float(gallivm, mask); in lp_build_pack_rgba_aos()
422 scales[i] = lp_build_const_float(gallivm, 1.0); in lp_build_pack_rgba_aos()
[all …]

1234567