Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for zero_point_ (0.12 sec)

  1. tensorflow/compiler/mlir/quantization/common/ir/UniformSupport.h

      UniformQuantizedValueConverter(double scale, double zero_point,
                                     double clamp_min, double clamp_max,
                                     uint32_t storage_bit_width, bool is_signed)
          : scale_(scale),
            zero_point_(zero_point),
            clamp_min_(clamp_min),
            clamp_max_(clamp_max),
            scale_double_(scale),
            zero_point_double_(zero_point),
            clamp_min_double_(clamp_min),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types_test.cc

                                          /*scale=*/1.0, /*zero_point=*/0);
    
      EXPECT_TRUE(quantized_type.getExpressedType().isF32());
    }
    
    TEST_F(CreateI8F32UniformQuantizedTypeTest, SignedQuantizedTypeSucceeds) {
      const UniformQuantizedType quantized_type =
          CreateI8F32UniformQuantizedType(UnknownLoc::get(&ctx_), ctx_,
                                          /*scale=*/1.0, /*zero_point=*/0);
    
      EXPECT_TRUE(quantized_type.isSigned());
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types.h

    UniformQuantizedPerAxisType CreateI8F32UniformQuantizedPerAxisType(
        Location loc, MLIRContext& context, ArrayRef<double> scales,
        ArrayRef<int64_t> zero_points, int quantization_dimension,
        bool narrow_range = false);
    
    // Creates a `UniformQuantizedPerAxisType` with the given `scales` and
    // `zero_points` values. The produced type has f32 as its expressed type and
    // i32 as its storage type. The available values use the full range of the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types.cc

        const ArrayRef<int64_t> zero_points, const int quantization_dimension,
        const bool narrow_range) {
      return UniformQuantizedPerAxisType::getChecked(
          loc, /*flags=*/QuantizationFlags::Signed,
          /*storageType=*/IntegerType::get(&context, /*width=*/8),
          /*expressedType=*/FloatType::getF32(&context),
          SmallVector<double>(scales), SmallVector<int64_t>(zero_points),
          quantization_dimension,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc

      if (!type) return type;
      SmallVector<double, 4> scales(mins.size());
      SmallVector<int64_t, 4> zero_points(mins.size());
      if (auto q_type = dyn_cast<UniformQuantizedType>(type)) {
        zero_points.push_back(q_type.getZeroPoint());
      } else if (auto q_type = dyn_cast<quant::UniformQuantizedPerAxisType>(type)) {
        zero_points = {q_type.getZeroPoints().begin(),
                       q_type.getZeroPoints().end()};
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

        int32_zero_points.push_back(zero_points[i]);
      }
      scale = rewriter.create<TF::ConstOp>(
          loc, scale_type, DenseFPElementsAttr::get(scale_type, float_scales));
      zero_point = rewriter.create<TF::ConstOp>(
          loc, zero_point_type,
          DenseIntElementsAttr::get(zero_point_type, int32_zero_points));
      return success(scale && zero_point);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/quantization/lite/quantize_model_test.cc

      EXPECT_THAT(pack_input0->quantization->zero_point[0],
                  Eq(pack_input1->quantization->zero_point[0]));
      EXPECT_THAT(pack_input1->quantization->zero_point[0],
                  Eq(pack_input2->quantization->zero_point[0]));
    
      EXPECT_THAT(pack_input1->quantization->scale[0],
                  FloatEq(pack_output->quantization->scale[0]));
      EXPECT_THAT(pack_input1->quantization->zero_point[0],
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 23:15:24 UTC 2024
    - 73.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/tests/flatbuffer2mlir/test_schema.fbs

      // QuantizationDetails union should be used.
      details:QuantizationDetails;
    
      // Specifies the dimension of the Tensor's shape that the scales and
      // zero_points correspond to. For example, a tensor t, with dims=[4, 3, 2, 1]
      // with quantization params:
      //   scale=[1.0, 2.0, 3.0], zero_point=[1, 2, 3], quantization_dimension=1
      // will be quantized across the second dimension of t.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 19 19:46:06 UTC 2021
    - 26.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/lstm_quantized.mlir

    // CHECK-NEXT:         zero_point: [ 0 ]
    // CHECK-NEXT:       },
    // CHECK-NEXT:       has_rank: true
    // CHECK-NEXT:     }, {
    // CHECK-NEXT:       shape: [ 2048, 528 ],
    // CHECK-NEXT:       type: INT8,
    // CHECK-NEXT:       buffer: 3,
    // CHECK-NEXT:       name: "arg2",
    // CHECK-NEXT:       quantization: {
    // CHECK-NEXT:         scale: [ 0.031926 ],
    // CHECK-NEXT:         zero_point: [ 0 ]
    // CHECK-NEXT:       },
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jul 14 16:41:28 UTC 2022
    - 15.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/quantization/numerical_utils.cc

    //   maximum quantized values.
    QuantizedRange CalculateQuantizedRange(double scale, int32_t zero_point,
                                           std::optional<double> rmin,
                                           std::optional<double> rmax, int32_t qmin,
                                           int32_t qmax) {
      auto quantize = [scale, zero_point](float f) {
        return zero_point + static_cast<int32_t>(std::round(f / scale));
      };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 17 19:57:04 UTC 2023
    - 3.3K bytes
    - Viewed (0)
Back to top