Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for preset_method (0.15 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/quantize_model_test.py

        model = self.SimpleModel()
    
        saved_model_save.save(model, self._input_saved_model_path)
    
        # Set an invalid value of -1 to QuantizationMethod.preset_method.
        options = quant_opts_pb2.QuantizationOptions(
            quantization_method=quant_opts_pb2.QuantizationMethod(preset_method=-1)
        )
    
        with self.assertRaises(ValueError):
          quantize_model.quantize(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 03:36:50 UTC 2024
    - 235.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/python/quantize_model.py

      )
    
      if (
          quant_method.preset_method == _PresetMethod.METHOD_STATIC_RANGE_INT8
          or quant_method.preset_method == _PresetMethod.METHOD_DYNAMIC_RANGE_INT8
      ) and (len(quant_method.quantization_component_specs) != 3):
        raise ValueError('Only 3 components are needed for', quant_method)
      elif (
          quant_method.preset_method
          == _PresetMethod.METHOD_STATIC_RANGE_WEIGHT_ONLY_INT8
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 03:36:50 UTC 2024
    - 34.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/utils/fill_quantization_options.cc

      QuantizationComponentSpec *activation_component, *weight_component,
          *bias_component;
      const auto preset_method = quantization_options_.quantization_method()
                                     .preset_quantization_method()
                                     .preset_method();
      if (!preset_method) return quantization_options_;
      switch (preset_method) {
        case PresetQuantizationMethod::FLOAT16:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 08:32:43 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/quantize_passes.cc

          quantization_options.quantization_method().preset_method(),
          quantization_options.op_set()));
      // TODO: b/260677670 - Pass quantization options as pass's inputs where
      // applicable
      pm.addPass(mlir::quant::CreateQuantizeCompositeFunctionsPass(
          quantization_options.quantization_method().preset_method(),
          quantization_options.op_set(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/quantization_options.proto

        METHOD_STATIC_RANGE_WEIGHT_ONLY_INT8 = 4;
      }
    
      // Preset quantization specification.
      PresetMethod preset_method = 4;
    
      // Define quantization specification for each component. Note that, if set,
      // this field will override the `preset_method`.
      repeated QuantizationComponentSpec quantization_component_specs = 3;
    
      reserved 1 to 2;
    }
    
    // Component spec for quantization.
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 19 06:31:19 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc

        op_set_.setCallback([this](const OpSet& new_op_set) {
          quant_options_.set_op_set(new_op_set);
        });
    
        // Set the test quantization method to static-range.
        if (quant_options_.quantization_method().preset_method() ==
            QuantizationMethod::METHOD_UNSPECIFIED) {
          quant_options_.mutable_quantization_method()->set_preset_method(
              QuantizationMethod::METHOD_STATIC_RANGE_INT8);
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/passes.h

    // Lifts the dynamic range quantizable spots as composite functions.
    std::unique_ptr<OperationPass<ModuleOp>>
    CreateLiftQuantizableSpotsAsFunctionsDRQPass(
        tensorflow::quantization::QuantizationMethod::PresetMethod
            quantization_method,
        tensorflow::quantization::OpSet op_set, int min_num_elements_for_weights);
    
    // Replaces tf.CustomAggregator ops with quant.Stats ops for finalizing the
    // calibration procedure.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/tests/fill_quantization_options_test.cc

        const tsl::protobuf::Message& x) {
      return ::testing::MakePolymorphicMatcher(ProtoStringMatcher(x));
    }
    
    void FillPresetQuantizationOptionsTestHelper(
        const PresetQuantizationMethod::PresetMethod preset_quantization_options,
        const QuantizationComponentSpec expected_activation_component,
        const QuantizationComponentSpec expected_weight_component,
        const QuantizationComponentSpec expected_bias_component) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 09:05:02 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions_drq.cc

    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops.h"
    
    namespace mlir {
    namespace quant {
    namespace {
    
    using QuantMethod =
        ::tensorflow::quantization::QuantizationMethod::PresetMethod;
    using ::tensorflow::quantization::OpSet;
    
    class LiftQuantizableSpotsAsFunctionsDRQPass
        : public PassWrapper<LiftQuantizableSpotsAsFunctionsDRQPass,
                             OperationPass<ModuleOp>> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_quantized_functions.cc

    #include "tensorflow/compiler/mlir/tensorflow/utils/error_util.h"
    
    namespace mlir {
    namespace quant {
    namespace {
    
    using QuantMethod = tensorflow::quantization::QuantizationMethod::PresetMethod;
    using ::tensorflow::quantization::OpSet;
    
    class InsertQuantizedFunctionsPass
        : public PassWrapper<InsertQuantizedFunctionsPass,
                             OperationPass<ModuleOp>> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top