Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for preset_method (0.17 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/python/integration_test/concurrency_test.py

        )
    
        quantization_options = quant_opts_pb2.QuantizationOptions(
            quantization_method=quant_opts_pb2.QuantizationMethod(
                preset_method=quant_opts_pb2.QuantizationMethod.PresetMethod.METHOD_STATIC_RANGE_INT8
            ),
            tags={tag_constants.SERVING},
            signature_keys=['serving_default'],
        )
    
        model = quantize_model.quantize(
            temp_path,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Sep 11 00:47:05 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/quantization_options.proto

        // via calibration phase and quantized during conversion.
        // Activation: qi8, Weight: qi8, Bias: qi32
        POST_TRAINING_QUANTIZATION_STATIC_RANGE = 4;
      }
      PresetMethod preset_method = 1;
    }
    
    // Custom option for specifying quantization spec details.
    // If the selected quantization option is not available, StableHLO quantizer
    // will raise an error.
    // NEXT ID: 2
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 22 02:20:05 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.h

        tensorflow::quantization::QuantizationMethod::PresetMethod
            quantization_method,
        bool enable_per_channel_quantization);
    
    LogicalResult FillAttributesForUniformQuantizedConvolutionOp(
        PatternRewriter& rewriter, Operation* op,
        llvm::StringMap<Attribute>& identifier_to_attr,
        tensorflow::quantization::QuantizationMethod::PresetMethod
            quantization_method,
        bool enable_per_channel_quantization);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Dec 10 05:52:02 UTC 2023
    - 3K bytes
    - Viewed (0)
  10. 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)
Back to top