- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for QuantizeLegacy (0.18 sec)
-
tensorflow/compiler/mlir/lite/transforms/quantize.cc
if (matchPattern(op.getInput(), m_Constant(&attr))) { auto qtype = op.getQtypeAttr(); Attribute quantized_attr; if (legacy_float_scale_) { quantized_attr = quant::QuantizeLegacy(attr, qtype.getValue()); } else { quantized_attr = quant::Quantize(attr, qtype.getValue()); } if (quantized_attr) { rewriter.replaceOpWithNewOp<QConstOp>(op, qtype, quantized_attr);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 13.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc
/*flags=*/true, storage_type, expressed_type, scales, zero_points, /*quantizedDimension=*/std::max(adjusted_quant_dim, 0), storage_type_min, storage_type_max); } } ElementsAttr QuantizeLegacy(const Attribute real_value, const Type tensor_type) { if (!isa<DenseFPElementsAttr>(real_value) || !quant::QuantizedType::getQuantizedElementType(tensor_type)) { return {}; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 43.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h
ElementsAttr Quantize(Attribute real_value, Type tensor_type); // Quantizes the elements in "legacy mode", where it calls TOCO's methods to // to quantize values with float scale. ElementsAttr QuantizeLegacy(Attribute real_value, Type tensor_type); // Returns the quantized type for an element attribute. The quantization // parameters in this type is based on the min and max element of the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 41.7K bytes - Viewed (0)