Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for getLayerStats (0.15 sec)

  1. tensorflow/compiler/mlir/quantization/common/ir/QuantOps.cc

      auto tensorArg = mlir::dyn_cast<TensorType>(getArg().getType());
      if (!tensorArg) return emitOpError("arg needs to be tensor type.");
    
      // Verify layerStats attribute.
      {
        auto layerStatsType = getLayerStats().getShapedType();
        if (!mlir::isa<FloatType>(layerStatsType.getElementType())) {
          return emitOpError("layerStats must have a floating point element type");
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc

      auto tensorArg = mlir::dyn_cast<TensorType>(getArg().getType());
      if (!tensorArg) return emitOpError("arg needs to be tensor type.");
    
      // Verify layerStats attribute.
      {
        auto layerStatsType = getLayerStats().getShapedType();
        if (!mlir::isa<FloatType>(layerStatsType.getElementType())) {
          return emitOpError("layerStats must have a floating point element type");
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

        }
    
        llvm::SmallVector<llvm::APFloat, 4> min_max_values;
    
        for (auto& stats_op : stats_ops) {
          auto values =
              mlir::dyn_cast<DenseFPElementsAttr>(stats_op.getLayerStats())
                  .getValues<llvm::APFloat>();
          min_max_values.insert(min_max_values.end(), values.begin(), values.end());
        }
    
        // min and max values of two stats are already the same.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

              expressed, is_signed);
          if (legacy_float_scale) {
            quant_type = DownCastScale(quant_type, mins, maxs, op->getLoc());
          }
        } else if (auto stats =
                       op.getLayerStats().dyn_cast<DenseFPElementsAttr>()) {
          // Per tensor quantization
          auto statValues = stats.getValues<APFloat>();
          double rmin = FloatAttr::getValueAsDouble(statValues[0]);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

    BufferOffset<tflite::QuantizationParameters>
    Translator::GetQuantizationForQuantStatsOpOutput(
        mlir::quantfork::StatisticsOp stats_op) {
      auto layer_stats =
          mlir::cast<mlir::DenseFPElementsAttr>(stats_op.getLayerStats());
      std::optional<mlir::ElementsAttr> axis_stats = stats_op.getAxisStats();
      std::optional<uint64_t> axis = stats_op.getAxis();
      std::vector<float> mins, maxs;
      mlir::DenseFPElementsAttr min_max_attr =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
Back to top