Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for calibration_methods (0.39 sec)

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

        OP_REQUIRES_OK(context, context->GetAttr("ids", &ids_));
        OP_REQUIRES_OK(context, context->GetAttr("calibration_methods",
                                                 &calibration_methods_));
        OP_REQUIRES(
            context, ids_.size() == calibration_methods_.size(),
            absl::AbortedError(
                "The `ids` and `calibration_methods` must have the same size."));
    
        // Check the number and type of inputs.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 13 01:31:23 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_calibration_statistics_saver.cc

        SmallVector<Value>& statistics_outputs, SmallVector<StringRef>& ids,
        SmallVector<int32_t>& calibration_methods) {
      for (auto op : region.getOps<TF::CustomAggregatorOp>()) {
        if (aggregator_ops_to_ignore.count(op.getId().str())) continue;
    
        ids.push_back(op.getId());
        calibration_methods.push_back(op.getCalibrationMethod());
        statistics_outputs.push_back(op.getMin());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/tests/passes/insert_calibration_statistics_saver_with_skipping.mlir

    // CKECK-SAME: <{calibration_method = 5 : i32, id = "skipping_id", num_bins = 32 : i32, max_percentile = 0.000000e+00 : f32, min_percentile = 0.000000e+00 : f32}> : (tensor<1x3x4x3xf32>) -> (tensor<1x3x4x3xf32>, tensor<f32>, tensor<f32>, tensor<512xi64>)
    // CHECK: %[[CUSTOM_AGGREGATOR_1:.*]], %[[MIN_1:.*]], %[[MAX_1:.*]], %[[HISTOGRAM_1:.*]] = "tf.CustomAggregator"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/tf_quant_ops.td

      let arguments = (ins
        TensorOf<[TF_Float32]>:$input,
    
        // The unique id of this `CustomAggregator` op.
        StrAttr:$id,
        // The integer value of the enforcing `CalibrationMethod`.
        I32Attr:$calibration_method,
        // The number of histogram bins.
        I32Attr:$num_bins,
        // Min percentile to be included in the selected range, only used in the
        // `HISTOGRAM_PERCENTILE` method.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_algorithm_test.py

    from tensorflow.python.platform import test
    
    _CalibrationMethod = (
        stablehlo_quant_config_pb2.CalibrationOptions.CalibrationMethod
    )
    
    
    class CalibrationAlgorithmTest(test.TestCase, parameterized.TestCase):
    
      def test_min_max_max(self):
        calib_opts = stablehlo_quant_config_pb2.CalibrationOptions(
            calibration_method=_CalibrationMethod.CALIBRATION_METHOD_MIN_MAX
        )
        statistics = calib_stats_pb2.CalibrationStatistics()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 11 19:29:56 UTC 2024
    - 5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/custom_aggregator_op.cc

        auto calibration_method =
            static_cast<CalibrationMethod>(calibration_method_value);
        OP_REQUIRES(
            context,
            calibration_method !=
                CalibrationOptions::CALIBRATION_METHOD_UNSPECIFIED,
            absl::AbortedError("The calibration method must be specified."));
    
        calib_opts_.set_calibration_method(calibration_method);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/integration_test/custom_aggregator_op_test.py

              [1.0, 2.0, 3.0, 4.0, 5.0], dtypes.float32
          )
    
          aggregator = custom_aggregator_op_wrapper.custom_aggregator(
              input_tensor,
              id='1',
              calibration_method=_CalibrationMethod.CALIBRATION_METHOD_MIN_MAX,
          )
          aggregator_output = self.evaluate(aggregator)
          self.assertAllEqual(aggregator_output.output, [1.0, 2.0, 3.0, 4.0, 5.0])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/cc/calibration/calibration_parameters.h

    }
    
    // Gets the number of bins for the given calibration method.
    inline int32_t GetNumBins(const CalibrationOptions& calib_opts) {
      return IsHistogramCalibration(calib_opts.calibration_method())
                 ? calib_opts.calibration_parameters().num_bins()
                 : 0;
    }
    
    }  // namespace stablehlo::quantization
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/tests/convert_custom_aggregation_op_to_quant_stats.mlir

      %0:4 = "tf.CustomAggregator"(%arg0) {min = -0.1 : f32, max = 0.2 : f32, id = "0", calibration_method = 1 : i32, num_bins = 0 : i32, max_percentile = 0.000000e+00 : f32, min_percentile = 0.000000e+00 : f32} : (tensor<8x8x8x8xf32>) -> (tensor<8x8x8x8xf32>, tensor<f32>, tensor<f32>, tensor<*xi64>)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 06:25:50 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/tests/components/pre_calibration_component.mlir

    // CHECK-DAG: %[[CST:.+]] = stablehlo.constant dense<1.000000e+00> : tensor<4x3xf32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 5.1K bytes
    - Viewed (0)
Back to top