Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for zero_point (0.33 sec)

  1. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types_test.cc

                                          /*scale=*/1.0, /*zero_point=*/0);
    
      EXPECT_TRUE(quantized_type.getExpressedType().isF32());
    }
    
    TEST_F(CreateI8F32UniformQuantizedTypeTest, SignedQuantizedTypeSucceeds) {
      const UniformQuantizedType quantized_type =
          CreateI8F32UniformQuantizedType(UnknownLoc::get(&ctx_), ctx_,
                                          /*scale=*/1.0, /*zero_point=*/0);
    
      EXPECT_TRUE(quantized_type.isSigned());
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/ir/UniformSupport.h

      UniformQuantizedValueConverter(double scale, double zero_point,
                                     double clamp_min, double clamp_max,
                                     uint32_t storage_bit_width, bool is_signed)
          : scale_(scale),
            zero_point_(zero_point),
            clamp_min_(clamp_min),
            clamp_max_(clamp_max),
            scale_double_(scale),
            zero_point_double_(zero_point),
            clamp_min_double_(clamp_min),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/lite/quantize_model_test.cc

      EXPECT_THAT(pack_input0->quantization->zero_point[0],
                  Eq(pack_input1->quantization->zero_point[0]));
      EXPECT_THAT(pack_input1->quantization->zero_point[0],
                  Eq(pack_input2->quantization->zero_point[0]));
    
      EXPECT_THAT(pack_input1->quantization->scale[0],
                  FloatEq(pack_output->quantization->scale[0]));
      EXPECT_THAT(pack_input1->quantization->zero_point[0],
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 23:15:24 UTC 2024
    - 73.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types.h

                                                         double scale,
                                                         int64_t zero_point,
                                                         bool narrow_range = false);
    
    // Creates a `UniformQuantizedType` with the given `scale` and `zero_point`
    // values. The produced type has f32 as its expressed type and i32 as its
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types.cc

                                                         const int64_t zero_point,
                                                         const bool narrow_range) {
      return UniformQuantizedType::getChecked(
          loc, /*flags=*/QuantizationFlags::Signed,
          /*storageType=*/IntegerType::get(&context, /*width=*/8),
          /*expressedType=*/FloatType::getF32(&context), scale, zero_point,
          /*storageTypeMin=*/llvm::minIntN(8) + (narrow_range ? 1 : 0),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

        int32_zero_points.push_back(zero_points[i]);
      }
      scale = rewriter.create<TF::ConstOp>(
          loc, scale_type, DenseFPElementsAttr::get(scale_type, float_scales));
      zero_point = rewriter.create<TF::ConstOp>(
          loc, zero_point_type,
          DenseIntElementsAttr::get(zero_point_type, int32_zero_points));
      return success(scale && zero_point);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/tests/end2end/quant_stats.pbtxt

    # CHECK-NEXT:          zero_point: [ 128 ]
    # CHECK-NEXT:        },
    # CHECK-NEXT:        has_rank: true
    # CHECK-NEXT:      }, {
    # CHECK-NEXT:        shape: [ 4 ],
    # CHECK-NEXT:        type: UINT8,
    # CHECK-NEXT:        buffer: 2,
    # CHECK-NEXT:        name: "input1",
    # CHECK-NEXT:        quantization: {
    # CHECK-NEXT:          scale: [ 0.023529 ],
    # CHECK-NEXT:          zero_point: [ 128 ]
    # CHECK-NEXT:        },
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_algorithm.py

        minbound = 0
        scale = (quant_max - quant_min) / maxbound
        zero_point = -quant_min / scale
    
        # Limit the range of zero_point and scale in case (quant_max - quant_min)
        # is unusually small.
        if abs(zero_point) > 9e9:
          zero_point = 9e9
        if abs(scale) < 1e-9:
          scale = 1e-9
    
        zero_point = round(zero_point)
        quantized_hist_mids = np.clip(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 11 19:29:56 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc

        return scale * rate;
      };
      const auto& recalculate_zero_point = [&](int64_t zero_point) -> int64_t {
        return qmax - std::round((storage_type_max - zero_point) / rate);
      };
      if (auto q_type = dyn_cast<UniformQuantizedType>(type)) {
        const double scale = recalculate_scale(q_type.getScale());
        const double zero_point = recalculate_zero_point(q_type.getZeroPoint());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/tests/end2end/fake_quant_per_channel_4bit.pbtxt

    # CHECK:         scale: [ 0.093635 ],
    # CHECK:         zero_point: [ 22 ]
    # CHECK:       }
    # CHECK:     }, {
    # CHECK:       shape: [ 1, 6, 31 ],
    # CHECK:       type: INT8,
    # CHECK:       buffer: 6,
    # CHECK:       name: "output",
    # CHECK:       quantization: {
    # CHECK:         scale: [ 0.093635 ],
    # CHECK:         zero_point: [ 22 ]
    # CHECK:       }
    # CHECK:     } ],
    # CHECK:     inputs: [ 0 ],
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 18.1K bytes
    - Viewed (0)
Back to top