- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for hist_freq (0.11 sec)
-
tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_algorithm_test.py
hist_freq = np.zeros(501, dtype=np.int32) # Advanced calibration methods that use histograms detect outliers, so they # don't use the outliers as min/max values. hist_freq[0] = 1 hist_freq[-1] = 1 # The majority of the data exists around the center. hist_freq[250] = 1000 for i in range(1, 201): hist_freq[250 - i] = 1000 - i
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Mar 11 19:29:56 UTC 2024 - 5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_statistics_collector_test.cc
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)); } TEST(HistogramStatisticsCollectorTest, AggregateSameBatchSize) { CalibrationOptions calib_opts; calib_opts.set_calibration_method(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 16 04:33:52 UTC 2024 - 12.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_statistics.proto
// lower_bound and bin_width can be used to restore the histogram. float lower_bound = 2; // hist_freq[i] saves frequency of range [bins[i], bins[i + 1]). // bins[i] = lower_bound + bin_width * i // 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;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 16 04:33:52 UTC 2024 - 1.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_algorithm.py
hist_stats = statistics.histogram_statistics self._bin_width = hist_stats.bin_width self._lower_bound = hist_stats.lower_bound self._hist_freq = np.array(hist_stats.hist_freq) self._num_bins = len(self._hist_freq) self._num_bits = 8 # i-th bin has a range [bins[i], bins[i + 1]). # bins[i] = lower_bound + i * bin_width # bins[i + 1] = lower_bound + (i + 1) * 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) -
tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_statistics_saver_op_test.cc
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) { std::vector<std::string> ids{"1", "2"}; std::vector<int32_t> calibration_methods{
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 13 01:31:23 UTC 2024 - 11.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_statistics_collector_histogram.cc
if (lower_idx < 0) { hist_freq_.insert(hist_freq_.begin(), -lower_idx, 0); lower_bound_ -= bin_width_ * (-lower_idx); lower_idx = 0; } int32_t upper_idx = CalculateBinIndex(upper_bound, lower_bound_, bin_width_); // If upper_idx >= hist_freq_.size(), then expand the histogram to the right. if (upper_idx >= hist_freq_.size()) { hist_freq_.resize(upper_idx + 1, 0); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 05 09:09:34 UTC 2024 - 5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_statistics_collector_histogram.h
float upper_bound); // hist_freq_[i] saves frequency of range [bins[i], bins[i + 1]). // bins[i] = lower_bound_ + bin_width_ * i // bins[i + 1] = lower_bound_ + bin_width_ * (i + 1) std::deque<float> hist_freq_; // Width of bin float bin_width_; // The first bin's left value. [left, right) float lower_bound_; };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 16 04:33:52 UTC 2024 - 2.5K bytes - Viewed (0)