- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for scale_fn (0.31 sec)
-
tensorflow/compiler/mlir/lite/quantization/quantization_context.cc
switch (spec->type) { case ScaleConstraintType::OutputInputFreeScale: { // no propagation. *changed |= false; break; } case ScaleConstraintType::CustomScale: { if (failed(spec->scale_fn(this, op, new_items, changed))) { return failure(); } break; } case ScaleConstraintType::OutputInputSameScale: { auto params = GetQuantParamsForSameScaleConstraint(op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 08 01:38:03 UTC 2024 - 13.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc
Value scale_op = rewriter.create<TF::ConstOp>( loc, scale_type, DenseFPElementsAttr::get(scale_type, {static_cast<float>(qtype.getScale())})); if (original_input_tensor_type.getElementType().isBF16()) { // Add bf16 cast op after scale to match with the next op's data // type. scale_op = rewriter.create<TF::CastOp>(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/ir/UniformSupport.h
return quantizeF32ToInt8(expressed_value); } bool lossy; expressed_value.convert(scale_.getSemantics(), round_mode_, &lossy); // fixed_point = clamp(clamp_min, clamp_max, ( // roundHalfToEven(expressed / scale) + zero_point)) APFloat scaled = (expressed_value / scale_); scaled.roundToIntegral(round_mode_); scaled.add(zero_point_, round_mode_);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 9.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantized_function_library_tf_drq.mlir
%scale_f64 = "tf.Div"(%range_nume, %range_deno) : (tensor<1xf64>, tensor<f64>) -> tensor<1xf64> %scale = "tf.Cast"(%scale_f64) : (tensor<1xf64>) -> tensor<1xf32> // Add comparison with minimum if needed %intermediate_val = "tf.Div"(%r_max_f64, %scale_f64) : (tensor<1xf64>, tensor<1xf64>) -> tensor<1xf64>
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 03 15:43:38 UTC 2023 - 12.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc
return failure(); } TF::ConstOp scale_op; TF::ConstOp zp_op; // Reads quantization parameters from the quantized type, and converts // them to constants. rewriter.setInsertionPoint(qparams_op); Location loc = qparams_op->getLoc(); if (auto qtype = cast_qtype.dyn_cast<quant::UniformQuantizedType>()) { scale_op = rewriter.create<TF::ConstOp>(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Nov 21 16:55:41 UTC 2023 - 38.2K bytes - Viewed (0) -
src/internal/profile/profile.go
if ratio == 1 { return } ratios := make([]float64, len(p.SampleType)) for i := range p.SampleType { ratios[i] = ratio } p.ScaleN(ratios) } // ScaleN multiplies each sample values in a sample by a different amount. func (p *Profile) ScaleN(ratios []float64) error { if len(p.SampleType) != len(ratios) { return fmt.Errorf("mismatched scale ratios, got %d, want %d", len(ratios), len(p.SampleType)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 08 17:57:40 UTC 2024 - 13.4K bytes - Viewed (0) -
src/cmd/vendor/github.com/google/pprof/profile/profile.go
return } ratios := make([]float64, len(p.SampleType)) for i := range p.SampleType { ratios[i] = ratio } p.ScaleN(ratios) } // ScaleN multiplies each sample values in a sample by a different amount // and keeps only samples that have at least one non-zero value. func (p *Profile) ScaleN(ratios []float64) error { if len(p.SampleType) != len(ratios) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 31 19:48:28 UTC 2024 - 22.3K bytes - Viewed (0) -
src/internal/profile/merge.go
} normScale := make([]float64, len(baseVals)) for i := range baseVals { if srcVals[i] == 0 { normScale[i] = 0.0 } else { normScale[i] = float64(baseVals[i]) / float64(srcVals[i]) } } p.ScaleN(normScale) return nil } func isZeroSample(s *Sample) bool { for _, v := range s.Value { if v != 0 { return false } } return true } type profileMerger struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 17 19:35:56 UTC 2020 - 11.3K bytes - Viewed (0) -
src/cmd/vendor/github.com/google/pprof/profile/merge.go
normScale := make([]float64, len(baseVals)) for i := range baseVals { if srcVals[i] == 0 { normScale[i] = 0.0 } else { normScale[i] = float64(baseVals[i]) / float64(srcVals[i]) } } p.ScaleN(normScale) return nil } func isZeroSample(s *Sample) bool { for _, v := range s.Value { if v != 0 { return false } } return true } type profileMerger struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 16 15:19:53 UTC 2024 - 17K bytes - Viewed (0)