Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for histogram_statistics (0.25 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_statistics_collector_test.cc

      EXPECT_TRUE(statistics.has_value());
      EXPECT_EQ(statistics.value().histogram_statistics().lower_bound(), 0.f);
      EXPECT_EQ(statistics.value().histogram_statistics().bin_width(), 2.f);
      // Trailing zeros should be removed.
      EXPECT_THAT(statistics.value().histogram_statistics().hist_freq(),
                  ElementsAre(1, 0, 3, 5, 7, 6, 5));
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 16 04:33:52 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_statistics_saver_op_test.cc

      const CalibrationStatistics& stats = statistics_map.statistics().at("1");
      ASSERT_TRUE(stats.has_histogram_statistics());
      EXPECT_FLOAT_EQ(stats.histogram_statistics().bin_width(), 0.5f);
      EXPECT_FLOAT_EQ(stats.histogram_statistics().lower_bound(), 1.f);
      EXPECT_THAT(stats.histogram_statistics().hist_freq(),
                  ElementsAre(1, 4, 6, 7, 3, 2, 1));
    }
    
    TEST_F(CalibrationStatisticsSaverTest, MultipleStats) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 13 01:31:23 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_algorithm_test.py

              ),
          },
      )
      def test_histogram_calibration_methods(self, calibration_options):
        statistics = calib_stats_pb2.CalibrationStatistics()
        statistics.histogram_statistics.lower_bound = 0.0
        statistics.histogram_statistics.bin_width = 1.0
    
        hist_freq = np.zeros(501, dtype=np.int32)
    
        # Advanced calibration methods that use histograms detect outliers, so they
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 11 19:29:56 UTC 2024
    - 5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_statistics.proto

        // bins[i + 1] = lower_bound + bin_width * (i + 1)
        repeated float hist_freq = 3;
      }
    
      MinMaxStatistics min_max_statistics = 1;
      AverageMinMaxStatistics average_min_max_statistics = 2;
      HistogramStatistics histogram_statistics = 3;
    }
    
    message CalibrationStatisticsMap {
      // A map from the id of CustomAggregator op to its collected statistics.
      map<string, CalibrationStatistics> statistics = 1;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 16 04:33:52 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_algorithm.py

      def __init__(
          self,
          statistics: calib_stats_pb2.CalibrationStatistics,
          calib_opts: stablehlo_quant_config_pb2.CalibrationOptions,
      ):
        """Builds histogram using statistics.histogram_statistics.
    
        lower_bound                                    hist_mid
             v                                            v
             |=========|=========|=========|=========|=========|
                        bin width
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 11 19:29:56 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_statistics_collector_histogram.cc

      }
    }
    
    std::optional<CalibrationStatistics>
    CalibrationStatisticsCollectorHistogram::GetStatistics() const {
      if (hist_freq_.empty()) return std::nullopt;
    
      CalibrationStatistics::HistogramStatistics hist_stats;
    
      // Skip trailing zeros in the histogram.
      int32_t real_size = hist_freq_.size();
      for (; real_size > 0; --real_size) {
        if (hist_freq_[real_size - 1] != 0) break;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 05 09:09:34 UTC 2024
    - 5K bytes
    - Viewed (0)
Back to top