Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for CalculateBinWidth (0.57 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/cc/calibration/calibration_parameters_test.cc

      const float lower_bound = CalculateLowerBound(min_value, bin_width);
      return std::ceil((max_value - lower_bound) / bin_width);
    }
    
    TEST(CalibrationParametersTest, CalculateBinWidthSmallerThanOne) {
      float bin_width = CalculateBinWidth(/*min_value=*/0.0, /*max_value=*/25.0,
                                          /*num_bins=*/256);
      EXPECT_FLOAT_EQ(bin_width, 0.125);
      int32_t actual_num_bins =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 05 09:09:34 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/custom_aggregator_op.cc

    #include "tensorflow/core/framework/types.h"
    #include "tsl/platform/errors.h"
    
    namespace tensorflow {
    namespace {
    
    using ::stablehlo::quantization::CalculateBinIndexSafe;
    using ::stablehlo::quantization::CalculateBinWidth;
    using ::stablehlo::quantization::CalculateLowerBound;
    using ::stablehlo::quantization::CalibrationOptions;
    using CPUDevice = ::Eigen::ThreadPoolDevice;
    using CalibrationMethod =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_statistics_collector_histogram.cc

    namespace tensorflow {
    namespace calibrator {
    namespace {
    
    using ::stablehlo::quantization::CalculateBinIndex;
    using ::stablehlo::quantization::CalculateBinWidth;
    using ::stablehlo::quantization::CalculateLowerBound;
    
    // Gets the histogram frequencies for the given range.
    float GetRangeFrequencies(absl::Span<const int64_t> histogram,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 05 09:09:34 UTC 2024
    - 5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/cc/calibration/calibration_parameters.h

    // Calculates the bin width from the range and expected number of bins. The
    // bin width is formalized to the form of 2^n. As a consequence, the actual
    // number of bins might be smaller than the given `num_bins`.
    inline float CalculateBinWidth(const float min_value, const float max_value,
                                   const int32_t num_bins) {
      const float raw_bin_width = (max_value - min_value) / num_bins;
      return std::pow(2, std::ceil(std::log2(raw_bin_width)));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 3.3K bytes
    - Viewed (0)
Back to top