Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for LSTMOp (0.11 sec)

  1. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

    using DQ = quantfork::DequantizeCastOp;
    
    template <typename LstmOp>
    LogicalResult GetLstmProperty(LstmOp op,
                                  operator_property::OpVariant* lstm_variant,
                                  operator_property::OperatorProperty* op_property,
                                  int activation_number_of_bits = 8) {
      if (llvm::isa<TFL::LSTMOp>(op.getOperation())) {
        lstm_variant->op_code = tflite::BuiltinOperator_LSTM;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc

      EXPECT_EQ(it->getName().getStringRef(),
                mlir::func::ReturnOp::getOperationName());
      it++;  // tensor_cast
      it++;  // lstm
      EXPECT_EQ(it->getName().getStringRef(),
                mlir::TFL::LSTMOp::getOperationName());
      EXPECT_EQ(it->getNumOperands(), 24);
      EXPECT_EQ(it->getNumResults(), 1);
      // cifg = false, so input2input is not None.
      EXPECT_FALSE(mlir::isa<NoneType>(it->getOperand(1).getType()));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/tools/op_quant_spec_getters_gen.cc

      // TODO(b/176258587): Move to OpTrait if this should be generalized.
      // Add special handling for LSTM.
      OUT(2) << "if (auto lstm_op = llvm::dyn_cast<TFL::LSTMOp>(op)) {\n";
      OUT(4) << "return GetLstmOpQuantSpec<TFL::LSTMOp>(lstm_op);\n";
      OUT(2) << "} else if (auto lstm_op = "
                "llvm::dyn_cast<TFL::UnidirectionalSequenceLSTMOp>(op)) {\n";
      OUT(4) << "return "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 15 11:18:44 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/quantization/tools/tflite_op_coverage_spec_getters_gen.cc

          if (act_type == InputDataType::INT16) {
            if (is_toco) {
              // Conditions when using TOCO.
              if (absl::StrContains(op_name, "LSTMOp")) continue;
            } else {
              // Conditions when using MLIR.
              if (!(absl::StrContains(op_name, "LSTMOp") ||
                    absl::StrContains(op_name, "SoftmaxOp") ||
                    absl::StrContains(op_name, "LogisticOp") ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 12.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/prepare_quantize.cc

      // consistent. Otherwise some FileCheck tests would fail.
      RewritePatternSet patterns_1(&getContext());
      if (quant_specs_.post_training_quantization) {
        patterns_1.add<PrepareLstmOutputScale<LSTMOp>>(ctx);
        patterns_1.add<PrepareLstmOutputScale<UnidirectionalSequenceLSTMOp>>(ctx);
      }
      if (is_qdq_conversion_ ||
          quant_specs_.qdq_conversion_mode != quant::QDQConversionMode::kQDQNone) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/converter_gen.cc

      std::ostringstream oss;
      oss << "Create" << op_name.drop_front(4).str() << "erator";
      return oss.str();
    }
    
    static inline bool IsLstmOp(const StringRef op_name) {
      return op_name.take_back(6) == "LSTMOp";
    }
    
    static int HasOptions(const Record &def) {
      if (def.getValueAsBit("hasOptions")) {
        return 1;
      }
      if (def.getValueAsBit("hasOptions2")) {
        return 2;
      }
      return 0;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 15:05:28 UTC 2023
    - 23.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/utils/lstm_utils.h

      // layer norm coefficients
      Value input_layer_norm_coefficients_;
      Value forget_layer_norm_coefficients_;
      Value cell_layer_norm_coefficients_;
      Value output_layer_norm_coefficients_;
    
      mlir::TFL::LSTMOp lstm_;
    
      Value none_;
      SmallVector<int64_t, 1> bias_slice_shape_;
      SmallVector<int64_t, 1> bias_size_values_;
      SmallVector<int64_t, 2> weight_slice_shape_;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 03 00:14:05 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

    //===----------------------------------------------------------------------===//
    // LSTMOp
    //===----------------------------------------------------------------------===//
    
    mlir::LogicalResult LSTMOp::verify() {
      LSTMOp op = *this;
      auto operands = op.GetStatefulOperands();
      if (operands.size() != 2 || operands[0] != 18 || operands[1] != 19) {
        return op.emitOpError("LSTMOp expected to have two stateful operands");
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

      auto func = getOperation();
      auto* ctx = func.getContext();
      TFL::populateWithGenerated(patterns);
      patterns.add<quant::FoldTrivalRequantizeOp<QuantizeOp>>(ctx);
      patterns.add<PruneUnusedOpsWithSideEffect<TFL::LSTMOp>>(ctx);
      patterns.add<PruneUnusedOpsWithSideEffect<TFL::UnidirectionalSequenceLSTMOp>>(
          ctx);
      patterns.add<PruneUnusedOpsWithSideEffect<TFL::SVDFOp>>(ctx);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/utils/lstm_utils.cc

      auto result_type = mlir::RankedTensorType::get(
          output_shape,
          mlir::cast<RankedTensorType>(input_.getType()).getElementType());
      lstm_ = builder_.create<mlir::TFL::LSTMOp>(
          fused_func_op_.getLoc(), result_type, input_, input2input_, input2forget_,
          input2cell_, input2output_, rec2input_, rec2forget_, rec2cell_,
          rec2output_, /*cell_to_input_weights*/ none_,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 36.2K bytes
    - Viewed (0)
Back to top