Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for preset_method (0.18 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/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)
  4. 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)
  5. 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)
  6. 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)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc

    // The preprocess-op Pass.
    //
    namespace mlir {
    namespace quant {
    
    namespace {
    
    using QuantMethod =
        ::tensorflow::quantization::QuantizationMethod::PresetMethod;
    using QuantizationUnit = std::pair<Operation*, int>;
    using QuantizationUnits = llvm::SetVector<QuantizationUnit>;
    using ::tensorflow::quantization::OpSet;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.cc

    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_types.h"
    #include "tensorflow/core/util/quantization/uniform_quant_ops_attr.pb.h"
    
    namespace mlir::quant {
    
    using QuantMethod = tensorflow::quantization::QuantizationMethod::PresetMethod;
    
    enum class OpType {
      kDynamicRangeOp,  // Dynamic Range kernels only have rhs attr.
      kUnaryOp,         // Unary ops have one min/max attr.
      kBinaryOp,        // Binary ops have lhs/rhs attr.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc

    // The prepare-quantize Pass.
    //
    namespace mlir {
    namespace quant {
    
    namespace {
    
    using QuantMethod = tensorflow::quantization::QuantizationMethod::PresetMethod;
    
    // Applies prepare quantization on the model in TF dialect. This pass runs
    // before the quantization pass and propagate the quantization parameters
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

    #include "tensorflow/core/ir/importexport/convert_tensor.h"
    
    namespace mlir {
    namespace quant {
    namespace {
    
    using QuantMethod = tensorflow::quantization::QuantizationMethod::PresetMethod;
    using ::tensorflow::quantization::OpSet;
    
    constexpr absl::string_view kQuantizeCompositeFunctionsStepName =
        "_quantize_composite_functions";
    constexpr StringRef kQuantizeFuncName = "quantize_i8";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
Back to top