Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExtractConstantIntFromTensor (0.48 sec)

  1. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

    // Extracts and returns the signed integer constant in a 0-rank integer tensor
    // or 1-element 1-rank integer tensor if 'value' is a constant.
    static std::optional<int64_t> ExtractConstantIntFromTensor(Value value) {
      ElementsAttr attr;
      if (!matchPattern(value, m_Constant(&attr))) return {};
      if (attr.getNumElements() != 1) return {};
      IntegerAttr int_attr = *attr.getValues<IntegerAttr>().begin();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
Back to top