- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for CalculateBinIndexSafe (0.44 sec)
-
tensorflow/compiler/mlir/quantization/stablehlo/cc/calibration/calibration_parameters_test.cc
} TEST(CalibrationParametersTest, CalculateBinIndex) { int32_t bin_index = CalculateBinIndexSafe(/*value=*/3.0, /*lower_bound=*/0.0, /*bin_width=*/2.0, /*num_bins=*/2); EXPECT_EQ(bin_index, 1); } TEST(CalibrationParametersTest, CalculateBinIndexMaxValue) { int32_t bin_index = CalculateBinIndexSafe(/*value=*/4.0, /*lower_bound=*/0.0,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 05 09:09:34 UTC 2024 - 3.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/calibrator/custom_aggregator_op.cc
#include "tensorflow/core/framework/tensor.h" #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;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 01:09:50 UTC 2024 - 6.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/cc/calibration/calibration_parameters.h
const float bin_width) { return std::floor((value - lower_bound) / bin_width); } // Same as `CalculateBinIndex` but clamps to avoid out-of-bound. inline int32_t CalculateBinIndexSafe(const float value, const float lower_bound, const float bin_width, const int32_t num_bins) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 01:09:50 UTC 2024 - 3.3K bytes - Viewed (0)